÷

 Step 1 : Are the Smalltalk VisualWorks programs faster? At a glance.

This chart shows 3 comparisons - Time-used, Memory-used and Code-used.

Each chart bar shows, for one unidentified benchmark, how much the fastest Smalltalk VisualWorks program used compared to the fastest Java 6 -server program.


 Step 2 : Are the Smalltalk VisualWorks programs faster? Approximately.

This table shows 3 comparisons - Time-used, Memory-used and Code-used.

Each table row shows, for one named benchmark, how much the fastest Smalltalk VisualWorks program used compared to the fastest Java 6 -server program.

 Smalltalk VisualWorks used what fraction? used how many times more? 
Benchmark Time Memory Code Reduced N
 k-nucleotide± 2,500,000
 fasta±
 fannkuch±±
 pidigits10×±
 reverse-complement11×1/2±
 regex-dna14×1/21/2
 binary-trees14×1/3±
 mandelbrot14×1/31/2
 chameneos-redux14×1/2±

± read the measurements and then read the program source code.

 Step 3 : Are the Smalltalk VisualWorks programs faster? Measurements.

This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ~ CPU Load.

For each named benchmark, measurements of the fastest Smalltalk VisualWorks program are shown for comparison against measurements of the fastest Java 6 -server program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ~ CPU Load
 k-nucleotide N = 2,500,000 reduced workload 
Smalltalk VisualWorks31.9331.93335,2961191  0% 1% 0% 100%
Java 6 -server6.436.6092,7801602  0% 0% 0% 100%
 fasta 
Smalltalk VisualWorks46.7946.7922,7161171  0% 0% 0% 100%
Java 6 -server8.338.3614,5801240  0% 0% 0% 100%
 fannkuch 
Smalltalk VisualWorks678.27678.2222,796772  0% 0% 0% 100%
Java 6 -server72.6872.6817,4601150  0% 0% 0% 100%
 pidigits 
Smalltalk VisualWorks68.0368.0337,732899  0% 0% 0% 100%
Java 6 -server6.936.9618,020938  0% 0% 0% 100%
 reverse-complement 
Smalltalk VisualWorks30.9730.97299,940754  0% 0% 0% 100%
Java 6 -server2.662.71475,772592  0% 1% 0% 97%
 regex-dna 
Smalltalk VisualWorks349.49349.48299,348584  0% 0% 0% 100%
Java 6 -server25.3525.40683,724929  0% 0% 0% 100%
 binary-trees 
Smalltalk VisualWorks255.48255.46197,720722  0% 0% 0% 100%
Java 6 -server18.5118.55565,112603  0% 0% 0% 100%
 mandelbrot 
Smalltalk VisualWorks593.08593.0522,772467  0% 0% 0% 100%
Java 6 -server41.2841.2966,940903  0% 0% 0% 100%
 chameneos-redux 
Smalltalk VisualWorks56.2756.2722,8562515  0% 0% 0% 100%
Java 6 -server3.883.9141,2801756  0% 0% 0% 99%
 n-body
Smalltalk VisualWorksFailed
 spectral-norm
Smalltalk VisualWorksFailed

 Measurements for all the accepted programs

 Smalltalk VisualWorks : uniform reflective environment - real live objects 

Code size measurements are misleading for Smalltalk because source files are usually only used to archive or transfer code. Smalltalk code is created, stored and run in a Smalltalk image. We show Smalltalk source code in a verbose chunk file format used to archive or transfer source code between Smalltalk images.

"Design Principles Behind Smalltalk" by Daniel Ingalls

VisualWorks,Release 7.6 of March 3, 2008

Home Page: Cincom Smalltalk™ VisualWorksl® Environment Data Sheet

Download: VisualWorksl® Non-Commercial


We've made the Smalltalk code a little more generic by abstracting out these implementation specific details:

Object subclass: #Tests
   instanceVariableNames: ''
   classVariableNames: ''
   poolDictionaries: ''
   category: 'Shootout'!


!Tests class methodsFor: 'platform'!
arg
   ^CEnvironment commandLine last asNumber! !

!Tests class methodsFor: 'platform'!
stdin
   ^Stdin! !


!Tests class methodsFor: 'platform'!
stdinSpecial
   ^ExternalReadStream on:
      (ExternalConnection ioAccessor: (UnixDiskFileAccessor new handle: 0))! !


!Tests class methodsFor: 'platform'!
stdout
   ^Stdout! !


!Tests class methodsFor: 'platform'!
stdoutSpecial
   ^ExternalWriteStream on:
      (ExternalConnection ioAccessor: (UnixDiskFileAccessor new handle: 1))! !


!Stream methodsFor: 'platform'!
nl
   self nextPut: Character lf! !


!Stream methodsFor: 'platform'!
print: number digits: decimalPlaces
   self nextPutAll:
      ((number asFixedPoint: decimalPlaces) printString copyWithout: $s)! !


!Stream methodsFor: 'platform'!
print: number paddedTo: width
   number printOn: self paddedWith: $  to: width base: 10! !


!Integer methodsFor: 'platform'!
asFloatD
   ^self asDouble! !

Revised BSD license