Playing with Exupery

Andres Valloud andresv at ntct1.com
Fri Feb 16 21:32:42 UTC 2007


Hello Göran et al,

Friday, February 16, 2007, 8:20:30 AM, you wrote:

GK> "Java is the winner, for 2100000 it spends 250 msec on average.
GK> Ruby 6500 msec on average. Squeak Smalltalk 2269 msec, VisualWorks
GK> Smalltalk 460 msec."

I found the webpage a bit confusing.  For example, the original code
snippets calculate square roots while the latter don't.

Nevertheless, I found the Smalltalk code to be worth of improvement.
For example, switching to use byte arrays and using 0 and 1 as
booleans results in a 25% speedup in VW.  The scaled times would be
250ms for Java and 370ms for VW.

Something important to note: not setting a single threaded program to
run exclusively on one of multiple available cores can result in
severe performance degradation under Windows XP (anywhere from no
degradation up to 2x slower).  The degradation itself is not stable
either, as it swings from moderate to really bad from one second to
the next.

This is something we're investigating in the context of VW, and it
seems to be related to Windows' process scheduler swapping cores under
single threaded programs leading to CPU cache thrashing.  Other single
threaded programs such as Winrar exhibit the same behavior.

I do not have access to an AMD dual core CPU, would somebody be able
to run some tests with and without core affinity set?

The "on average" description of run times may have something to do
with this, and to me it casts a bit of doubt as to the precision of
the results.

We also observed that running two images on a dual core CPU, with each
image set to run on one of the cores, results in both images running
faster than a single image with core affinity by about 10%.

As you can see, further research is required.  If anybody has good
pointers on this, I'd appreciate a link.

-- 
Best regards,
 Andres                            mailto:andresv at ntct1.com




More information about the Squeak-dev mailing list