On Tue, Jan 25, 2022 at 03:29:17PM +0100, [email protected] wrote: > On Tue, Jan 25, 2022 at 09:18:55AM -0500, Stefan Monnier wrote: > > > it's surprising that "The x64 binary are also somewhat larger than the > > > i386 > > > binaries" > > > > There is no fundamental reason why a 64bit architecture (like amd64) would > > require more code than a 32bit architecture (like x86), but yes, on the > > average amd64 code is a bit larger than x86. > > For one, pointers are bigger. For another, ints too. So perhaps, for > plain, straight, silly compiled C code...
I just spent a whole bunch of time writing something similar, in response to this... and then I figured out that Stefan simply made one poor word choice that caused the message to be extremely confusing. I believe that what Stefan meant here is that the amd64 binary has the same number of *instructions*. But as you say, the instructions may be physically longer, due to having longer operands. So yes, amd64 compiled code tends to take up more space. Even if it's got the same number of instructions (which may or may not be true in all cases -- the increased number of registers, for example, may actually decrease the number of instructions spent moving values in and out of memory).

