Optimizing Squeak

Reinier van Loon R.L.J.M.W.van.Loon at inter.nl.net
Mon Feb 22 20:08:09 UTC 1999


Greg,
>
>The first question is where is Squeak speedwise?
>I have tested Squeak against various other Smalltalks and C
>(and some tests against Python) using the Stanford benchmarks
>distributed with Self.  A summary of the results follows,
>where the speed of C is 1, and the numbers are how many times
>slower each is.


I could give you the Visual Smalltalk Enterprise 3.1.3 figures along with a
C (Visual C++ 6.0) and Squeak2.3 on a P2-450MHz if you would be so kind to
send me the files.

A while ago I did a simple test with a colleague to see what the speed
differences were between Java, VSE and C++.  To test it we implemented the
operator + as class (see below) using the C++ program model.

  class Operator
    class Plus
  class Value
  class Program (has a method main)

The first results we're surprising in one point: VSE was the fastest one!
Coding and getting it to run took 45 min. in both C++ and Java and 15 min.
in VSE. Execution times we're something around 50 seconds for both C++ and
Java and about 1 second for VSE (1.000.000 iterations). After we removed the
new statements from the inner loop, disabled virtual methods for C++ and
used 'optimize on speed' in the compiler C++ the C++ program was as fast as
the VSE version.

Regards, Reinier.

Note: My colleague was so impressed with this (development as well as
execution time) that the next project he did was in Smalltalk. He built a
complete regression test tool for our project which is still in use today
(over a year now) (without prior knowledge of Smalltalk). There's only one
thing to complain about: He used the conventions as he was used to in C++
like a capital for method names and so forth. About everything started with
a capital so you ended up with a piece of code which could refer to a class,
a class variable, som other global or ... a selector. Confusing.





More information about the Squeak-dev mailing list