Hacker News new | past | comments | ask | show | jobs | submit login

x32 mode can be a huge win if your data structures contain lots of pointers/references. It can shrink the memory usage and speed up computation by surprising amounts (compared to running the same process in a 'full' 64 bit mode). It's not just for when you are writing your own intricate code, either. An x32 build of perl sped up some of my programs dramatically, and let me run stuff on a 4GB machine that previously couldn't fit the data in.

Ubuntu has some x32 packages available for their standard 64 bit distribution, but the selection is limited.




Did you compare x32 versus the old fashioned i386?


Nope, other stuff on the machine needed 64 bits so unfortunately it would be difficult to do the comparison.

In theory, x32 should still be faster because the code gets to use all the other x64 features, like a larger register set and so on. I've no idea how big a difference that actually would make though.


You can run 32 bit binaries on 64 bit system. I bet Ubuntu has several 32 bit packages available because they are needed by Wine and and closed-source 32 bit binaries.

The theoretical possibility for speedup is exactly why I asked. The x32 website has benchmarks where it's as fast as i386 and 40% faster than amd64 on pointers or as fast as amd64 and 40% faster than i386 on 64 bit math, but what's missing to really justify x32 is some "20% better than either" case.


Sorry, I see what you mean now! For some reason, I completely forgot about running a plain 32 bit version... sorry but I don't have the chance to easily run the code again right now and compare.


Sounds like a 50-50 mix would do that trick, right?


Not that you need to use x32 to use arena allocation with 32 bit pointers inside it.




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

Search: