Home
[HN Gopher] 10B Integers Walk into an Array ___________________________________________________________________ 10B Integers Walk into an Array Author : ingve Score : 17 points Date : 2024-10-14 09:59 UTC (2 days ago) HTML web link (donraab.medium.com) TEXT w3m dump (donraab.medium.com) | Elfener wrote: | > This is one place where static typing and primitive types fall | short. | | I can't reproduce it here, but I found it really funny that | "short" was monospaced, like it was the type. | superjan wrote: | The author wonders why he does not see a memory footprint for the | billions of objects, and conjectures they are stored in-line in | the array. I suspect that it is actually achieved by the | flyweight pattern, where copies of the same immutable (reference | type) object are simply the same object. | owl57 wrote: | All the numbers in that array are different. | tehjoker wrote: | More people in the world than a uint32_t... never thought about | it like that. | anothername12 wrote: | Is this just tag bits in the reference pointer? ___________________________________________________________________ (page generated 2024-10-17 06:00 UTC)