However, one bit of untruth you’ll hear is that you can’t use the 8GB of RAM in a Pi4 with a 32-bit OS. Unfortunately, nobody outside HPC uses them, and I’m not about to maintain my own x32 distro. Why not both? Well, if you want to use the x32 ABI, or the ARM equivalent Arm64ilp32Port, yes, you can have most of the benefits of the 64-bit register count without the memory pressure. And that’s why I’m going through this benchmark suite! Yes, it’s still 32-bit instructions, but it drops the nice conditional execution field on almost everything. On both x86 and ARM, 64-bit code tends to be a bit less dense than 32-bit code - which means, again, you can fit less in the various caches. You’ve increased the amount of data you can store in registers, but reduced (by up to half) the number of data elements you can fit in a given amount of memory - like the high speed L1/L2 caches on the processor. Going to 64-bit data types (and 64-bit pointers) doubles the memory footprint for various types of data - and that means you can fit less data in a given amount of memory. Of course, there’s (usually) no such thing as a free lunch. Plus, as has been shown in some microbenchmarks, there are often new and exciting instructions that do things like AES encryption or SHA hashing in hardware! This is radically faster than software - but does it matter in terms of actual system performance? That’s the open question. This tends to improve performance, and a combination of allowing 64-bit values and adding registers tends to mean that 64-bit code runs a good bit faster than 32-bit code! Increasing the number of registers, all other things being equal, means you can keep more data in the highest speed access section of the processor. On ARM, the transition went from about 12 general purpose registers (depending on how you count) to about 30 (and dropped direct PC access). For x86 processors, the transition to 64-bit involved going from 4 primary registers to 12, and making some of the other registers a bit more flexible (RIP-relative addressing, for one). On a 64-bit machine, they’re 64 bits! This works out to being able to handle larger values and virtual address spaces, and generally tends to be nicer to work with.īut there’s more! In the transition to 64-bit, most architectures add registers and clean other things up. How big are they? On a 32-bit machine, they’re 32 bits wide. Addresses of the data you’d like to load go in registers. On most processors, if you want to add two numbers together, they have to be in registers (or sometimes one has to be in a register and the other register points to a memory address). ![]() ![]() Registers are the “core storage” in a processor. Well… OK, but what if we do something more comprehensive and get a better feel for actual system performance? Of course, you probably know I’m about to do just that… 32-bit vs 64-bitįundamentally, the difference between 32-bit and 64-bit processor modes is the register width. ![]() One of these things, in the moderate past, has involved Raspberry Pis and 64-bit operating systems, with the claim that of course you want 64-bit OSes on the Pi, especially the Pi4, because look at these little microbenchmarks that show you fancy new hardware features only available in 64-bit (AArch64) mode! Post some microbenchmarks, without context, and draw a conclusion based on those without considering all the various details that go into system performance. It’s pretty easy to annoy me on the internet some days.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |