Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is absolutely idiotic to have 64-bit pointers when I compile a program that uses less than 4 gigabytes of RAM. When such pointer values appear inside a struct, they not only waste half the memory, they effectively throw away half of the cache.

Is that true? It's weird to hear Knuth complain about such a down-to-earth problem.



This is actually a serious problem when using complex data structures that consist primarily of pointers between memory locations (example: linked lists or trees): this is the one case where 64-bit can actually be significantly slower than 32-bit. Imagine a doubly linked list that contains "int" values: on 32-bit each node would be 96 bits, on 64-bit each node would be 160 bits.


This is a common complaint by games developers too. Blowing half your cache on unused bytes in pointers is really annoying.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: