From: "M. Edward (Ed) Borasky" Date: 2008-02-22T23:51:00+09:00 Subject: Re: [OT] Re: [QUIZ #157] 32bit vs 64bit vs UML performance Kyle Schmitt wrote: > OK, I didn't have a 32bit install on a 64 bit capable box that was > unused, so I compiled a 32bit and a 64bit ruby stable on one of the > larger boxes (2 dual core 3ghz opterons, 16gb of ram, aside from > forcing 64 and 32 bits, they had the same compilation flags) and let > it run through those benchmarks overnight. Setting it was a good way > to spend 10 minutes. > > The interesting part is that the 32bit build ran slightly faster than > the 64bit build, even though this is a 64 bit linux box. > The average time for a complete run of the benchmark differed by 30 seconds. > 32 bit:130.19040000000000000000 > 64 bit:160.51990000000000000000 > > I'll be the first to admit this wasn't the best test, considering the > box wasn't in single user mode, but each run was niced to -20, there > were several gigs of ram free even during the tests, and the system > load before the test started was under 0.3. > > Now the question is, what does that actually _tell_ us? > Here are the options as far as I can see, but I'd be interested to > know what others there may be... > 1) The load time for 64 bit ruby takes longer > 2) The core ruby language needs some re-writes/tuning to work properly > for 64 bit. > 3) or.. just a few portions of the ruby language need re-writes/tuning > to work properly for 64 bit. > > --Kyle > > If my profiles for the benchmark are to be believed (and I have no reason to doubt them) it tells us that method dispatch and garbage collection are slower on 64 bit Ruby than 32 bit Ruby. One other piece of information that would be interesting is the difference in executable size. I would expect the 64-bit executable to be larger if entries are getting properly aligned on doubleword boundaries. And that in turn would mean on average, less of the executable would be in the "instruction cache" for the 64-bit one. Try a "size " and see what the difference is. CodeAnalyst will answer all these questions for you. :) http://developer.amd.com/tools/codeanalystlinux/Pages/default.aspx