Experience porting Squeak to 64-bit machines?
Yoel Jacobsen
yoel at emet.co.il
Wed Feb 6 13:02:31 UTC 2002
Well, this is true, minus the 'just fine' part. 32 bit applications run
somewhat slower on many 64 bit RISC architecture (I do not have access
to an Itanium).
Please take a look at the attached program for instance. This is a piece
of code from Sun's 'Blue print' book for application tuning. In the book
it is need to demonstrate the effect of xsafe=mem compiler option of
Sun's compilers.
Compiling with 'gcc -O2' on my laptop (PIII 850MHz, Win2K) yields
exception time of 2.23 seconds. On Sun Blade1000 (UltraSpace III 750MHz)
using Sun's compiler with every bit of compiler optimization runs in
3.02 seconds for 32 compilation and in 3.7 seconds for 64 bit
compilation (including double word alignment).
Now when changing 'int a[12000]' to 'long long int[12000]' (to force 64
bit elements) gives on the Intel 4.08 seconds (after some compiler
optimizations) and on the UltraSparc - 3.95 seconds (a bit faster for
100Mhz less).
May be someone more with knowledge about these CPU architecture can get
better performance by using different compiler settings.
By the way, I made these tests because I was troubled by how slow squeak
is on Solaris (~25M bytecode/sec on Ultra 10 440MHz, ~45M on this Blade
1000)... I'm quite sure it will get no better unless squeak will be
ported to 64bit.
Yoel
Georg Gollmann wrote:
> At 10:41 Uhr -0800 04.02.2002, Dan Ingalls wrote:
>
>> I remember a brief thread about this quite a while ago. I'd
>> appreciate any pointers and any code that deals with the necessary
>> image conversion whether in the Simulator, the SystemTracer, or a
>> special utility.
>
>
> I think most 64-bit systems run 32-bit code just fine (my experience
> with Solaris 7). So changes are only necessary if you want to move to
> 64-bit OOPs.
>
> Georg
-------------- next part --------------
/* example_xsafe.c */
/* cc -xarch=v8plus -xO5 example_xsafe.c -o \
example_xsafe (-xsafe=mem) */
#include<stdio.h>
#include <sys/time.h>
int main()
{
int a[12000],*p, b_val, b[200], i;
long long int start, end, nano=1000000000;
for(i=0;i<200;i++){ /* initalize a[] and b[] */
b[i]=i;
}
for(i=0;i<12000;i++){
a[i]= (i%10) + 20;
}
for(i=0;i<50000;i++){
for(p=a+1; p<=a+10000; p+=8){
b_val = b[(*(p))];
if (( (b_val >> *(p+1)) & 1) != 0) break;
b_val = b[(*(p+1))];
if (( (b_val >> *(p+2)) & 1) != 0) break;
b_val = b[(*(p+2))];
if (( (b_val >> *(p+3)) & 1) != 0) break;
b_val = b[(*(p+3))];
if (( (b_val >> *(p+4)) & 1) != 0) break;
b_val = b[(*(p+4))];
if (( (b_val >> *(p+5)) & 1) != 0) break;
b_val = b[(*(p+5))];
if (( (b_val >> *(p+6)) & 1) != 0) break;
b_val = b[(*(p+6))];
if (( (b_val >> *(p+7)) & 1) != 0) break;
b_val = b[(*(p+7))];
if (( (b_val >> *(p+8)) & 1) != 0) break;
}
}
printf("Finish i=%d, *p = %ld \n", i, *p);
return 0;
}
More information about the Squeak-dev
mailing list
|