[Vm-dev] Re: [squeak-dev] 64bit VMs some thoughts.

David T. Lewis lewis at mail.msen.com
Fri Dec 4 00:23:03 UTC 2009


On Thu, Dec 03, 2009 at 05:33:09PM -0500, David T. Lewis wrote:
>  
> On Thu, Dec 03, 2009 at 03:03:48PM -0500, David T. Lewis wrote:
> > 
> > I would guess that the difference I am seeing now is due to compiler version.
> > Ian's VM was compiled with gcc 4.3.3 and I am using an older gcc 4.1.2 compiler.
> > 
> > The results I got were:
> > 
> > For a 64-bit VM that I compiled locally, installed in /usr/local:
> > CPU: AMD Turion(tm) 64 Mobile Technology ML-34, 1600 MHz
> > OS: Linux version 2.6.18.2-34-default
> > Compiler for VM: gcc 4.1.2
> > Results:
> > 
> >     0 tinyBenchmarks ==> 154031287 bytecodes/sec; 5145368 sends/sec
> >     0 tinyBenchmarks ==> 153201675 bytecodes/sec; 5183202 sends/sec
> >     0 tinyBenchmarks ==> 151658767 bytecodes/sec; 5268426 sends/sec
> > 
> > For a 32-bit VM from Ian's site, running the same image from a local directory:
> > CPU: AMD Turion(tm) 64 Mobile Technology ML-34, 1600 MHz
> > OS: Linux version 2.6.18.2-34-default
> > Compiler for VM: gcc 4.3.3
> >   Results:
> > 
> >     0 tinyBenchmarks ==> 62135922 bytecodes/sec; 3330746 sends/sec
> >     0 tinyBenchmarks ==> 62256809 bytecodes/sec; 3425013 sends/sec
> >     0 tinyBenchmarks ==> 62317429 bytecodes/sec; 3346096 sends/sec
> > 
> 
> After installing a prodigious number of 32-bit libraries on my 64-bit
> Linux, I can now build a 32-bit VM for comparison. Here are the results
> of a 64-bit versus 32-bit VM using the same compiler, operating system,
> and hardware:
> 
> Compiled in 64-bit mode:
> 0 tinyBenchmarks '155339805 bytecodes/sec; 5304104 sends/sec'
> 0 tinyBenchmarks '155812538 bytecodes/sec; 5393385 sends/sec'
> 0 tinyBenchmarks '155151515 bytecodes/sec; 5272367 sends/sec'
> 
> Compiled in 32-bit mode:
> 0 tinyBenchmarks '136679124 bytecodes/sec; 4652907 sends/sec'
> 0 tinyBenchmarks '135521439 bytecodes/sec; 4659058 sends/sec'
> 0 tinyBenchmarks '135665076 bytecodes/sec; 4690056 sends/sec'
> 
> So overall I see about a 14% speed advantage for the 64-bit VM versus
> the 32-bit VM on this platform. Again, this is with the older gcc 4.1.2
> compiler.

With apologies, I have to retract that last set of numbers. I may have
inadvertently let my CPU fall into power save mode (I'm not sure). But
in any case, I wanted to repeat the experiment, so I build two VMs from
scratch, and the results I get this time are:

VM compiled in 64-bit mode:
0 tinyBenchmarks '158024691 bytecodes/sec; 4354017 sends/sec'
0 tinyBenchmarks '156670746 bytecodes/sec; 5187016 sends/sec'
0 tinyBenchmarks '155623100 bytecodes/sec; 5198491 sends/sec'
0 tinyBenchmarks '157635467 bytecodes/sec; 5179393 sends/sec'
0 tinyBenchmarks '157732593 bytecodes/sec; 5104384 sends/sec'
0 tinyBenchmarks '157927205 bytecodes/sec; 5221596 sends/sec'

VM compiled in 32-bit mode:
0 tinyBenchmarks '160300563 bytecodes/sec; 5179393 sends/sec'
0 tinyBenchmarks '160200250 bytecodes/sec; 5256640 sends/sec'
0 tinyBenchmarks '160703075 bytecodes/sec; 5126658 sends/sec'
0 tinyBenchmarks '160905091 bytecodes/sec; 5085970 sends/sec'
0 tinyBenchmarks '157635467 bytecodes/sec; 5202328 sends/sec'
0 tinyBenchmarks '158907510 bytecodes/sec; 5233225 sends/sec'

So the 32-bit VM may be two or three percent faster than the 64-bit
version on this platform.

Summary: I do not see evidence of a big performance hit from use
of 64-bit pointers, but there may well be a large performance hit
from use of the latest gcc compiler.

Dave

 


More information about the Vm-dev mailing list