5 ms·
Other tech folk have always talked about 32 bit support as a necessary evil since smaller types mean less memory. The complexity of managing a secondary 32 bit
by nailer 10y ago
Other tech folk have always talked about 32 bit support as a necessary evil since smaller types mean less memory.
The complexity of managing a secondary 32 bit environment has been worse than the memory usage of 64 bit apps for a very, very long time.
- __s 10y agoIf people want 32 bit pointers on 64 bit hardware they should pick the x32 ABI instead
- jwilk 10y ago...which is not supported by Arch either.
- Volundr 10y agoWhat do you mean? The announcement specifically says multilib is unaffected. I run 32-bit programs all the time.
- dfox 10y agoMultilib is different concept from x32 ABI. Typical usecase for multilib is running i386 binaries that use i386 ABI on amd64 system (or sun4m binaries on sun4u, mips32 on mips64...), x32 ABI is alternate ABI for amd64 that uses 32bit pointers, but all other amd64 ISA extensions.
- Volundr 10y agoToday I learned something. Thanks!
- andreyv 10y agoEven though it is not supported officially, you can install the x32 libraries from AUR: https://aur.archlinux.org/packages/?K=libx32 https://aur.archlinux.org/packages/?K=libx32
- joaomsa 10y agoThat need has been met by the x32 ABI for some time now, it combines some of the best parts of the x86_64 arch with the lower memory consumption of 32bit (still limited to 4gb max memory though) https://en.wikipedia.org/wiki/X32_ABI https://en.wikipedia.org/wiki/X32_ABI
- hawski 10y agoDoes anyone use x32 ABI though? I once asked and only crickets answered. I'm experimenting with my own Linux distribution and was wondering if it is worth the time investment.
- mastax 10y ago> (still limited to 4gb max memory though) 4GB max address space per process. It should support much more memory through PAE [1], which makes things more reasonable. [1]: https://en.wikipedia.org/wiki/Physical_Address_Extension https://en.wikipedia.org/wiki/Physical_Address_Extension
- hsivonen 10y agox86 isn't just 32-bit. Linux distros have been reluctant to upgrade their notion of 32-bit x86 to require SSE2. This means that x86 isn't just 32-bit but involves weird 387 floating-point math when other mainstream architectures use IEEE floating-point math.
- TazeTSchnitzel 10y agoPerhaps they're targeting people with old hardware?
- hsivonen 10y agoObviously, but everyone with more recent CPUs (as in only 14 years old) who runs x86 packages ends up running less efficient software.
- floatboth 10y agoInterestingly however, Linux distros have been quick to adopt i686. I remember setting up a router on a small PC with a VIA processor several years ago. Inserted a Debian hard drive into that box — "cmov instruction not supported" instead of booting. The i586 version existed of course, but wasn't the default download IIRC.
- poizan42 10y agoThere are a lot of things that gives bigger memory usage and larger code size that modern compilers do that we could try to address. * The stack is always kept aligned at 16 bytes boundary. This is needed for external calls by the ABI, but LTCG could drop these for internal calls and align the stack when needing SSE instead. This may be slightly more expensive than keeping the stack constantly 16-byte aligned, but it avoids wasting a lot of stack, so may very well be faster overall just by nature of less cache utilization. * No push and pop, reserves needed stack space (even for function calls) in prologue and accesses stack with mov and lea instead. The full mov/lea instructions with mod/rm+sib takes up far more bytes that simple push and pop, but apparently it's faster. * Inefficient instructions are replaced with more efficient instructions. For example gcc will for a simple x % 19 generate no less than 16 instructions instead of a single div/idiv. This is probably still faster, but it may still be detrimental if it's not in a hot path. It should be noted that gcc emits this even at -O0. * Multiple versions of code copying, scanning or comparing arrays for handling different alignments. This seems quite stupid as there isn't even any penalty for unaligned accesses on modern x86 cpus except in some very specific circumstances[0] These are all microoptimizations for getting the absolutely maximal performance out of tiny programs containing only hot code. However in reality programs rarely looks like that, and the increased code size and stack usage costs more than it gives. Profile guided optimizations is probably the way to go here, but distributed binaries have rarely if ever been compiled with PGO. Also I have no idea if PGO actually does drop these enlarging optimizations on non-hot codepaths on modern compilers. [0]: http://lemire.me/blog/2012/05/31/data-alignment-for-speed-myth-or-reality/ http://lemire.me/blog/2012/05/31/data-alignment-for-speed-my...
- aaronmdjones 10y ago> * Inefficient instructions are replaced with more efficient instructions. For example gcc will for a simple x % 19 generate no less than 16 instructions instead of a single div/idiv. This is probably still faster, but it may still be detrimental if it's not in a hot path. It should be noted that gcc emits this even at -O0. Does it emit it at -Os ?
- poizan42 10y ago