[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] Re: GNU ST Speed
From: |
Tomas Vanak |
Subject: |
[Help-smalltalk] Re: GNU ST Speed |
Date: |
Mon, 13 Jan 2003 12:58:50 +0100 |
Hi Paolo,
I wanted to try the same code in both smalltalks, that is why I used the
given code.
>From the output of ./configure I can see I'm not using the GMP library:
checking how to link with GMP... not found
even when I'm using ./configure --with-gmp=/usr/lib
I have a libgmp.so.3.1.1 library there. Do I need another version? Am I
putting the -with-gmp parameter wrong?
Thanks
Best regards
Tomas
----- Original Message -----
From: "Paolo Bonzini" <address@hidden>
To: "Tomas Vanak" <address@hidden>
Cc: <address@hidden>
Sent: Tuesday, January 07, 2003 10:34 AM
Subject: Re: GNU ST Speed
> > I tried the version 2.0h and I saw a lot of improvements!
> > Amazing work!
>
> Thanks!
>
> > I was trying to compare the speed of St/X and GNU St.
> > I tried just a simple example of a factorial:
> > Integer>>factorial
> > |p i|
> > p := 2.
> > i := 3.
> > [i <= self] whileTrue: [
> > p := p * i.
> > i := i + 1.
> > ].
> > ^p
>
> Why don't you use the bundled factorial method? It is optimized to the
> extreme... also check that you are using GMP. ST/X's LargeIntegers are
> coded in C, without GMP GNU Smalltalk's are coded in Smalltalk.
>
> > Then I did-it: 1000 timesRepeat: [1000 factorial], on GNU St it took
many
> > minutes to complete and it was scavenging all the time.
>
> A scavenging takes a few milliseconds. Even using -g might improve the
> performance by avoiding printing the messages. It might also be
worthwhile
> to increase the size of new-space (see methods in ObjectMemory) -- in
> general, not only for this example -- for example having 1 MB of new-space
> and 200 Kb for each survivor space (total 1,5 MB; currently I have 300 Kb
> and 40 Kb). More info on the new GC/memory manager is found in the info
> documentation
>
> Paolo
>