3 ms·
Several few decades ago, pointer chasing was much cheaper because the difference between an arithmetic operation and a memory access was far lower. CPUs in thos
by lorenzhs 6y ago
Several few decades ago, pointer chasing was much cheaper because the difference between an arithmetic operation and a memory access was far lower. CPUs in those times didn't even have caches (because they weren't needed). That made linked lists a reasonable choice. But CPU and memory speeds have been diverging -- both are growing at an exponential pace, but with different exponents, so the gap is also growing exponentially! So now we have a huge memory hierarchy and random accesses into memory are really slow and linked lists rarely make sense.
- masklinn 6y ago> Several few decades ago, pointer chasing was much cheaper because the difference between an arithmetic operation and a memory access was far lower. Also allocation was just bumping the brk.