÷

 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.


 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
 fasta±±
 chameneos-redux1/2±
 pidigits11×±1/2
 reverse-complement12×1/2±
 k-nucleotide13×± 2,500,000
 binary-trees16×1/3±
 regex-dna32×1/21/2
 fannkuch35×±±
 mandelbrot55×1/31/2

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

 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
 fasta 
Smalltalk VisualWorks47.2847.2722,7121171  0% 100% 0% 0%
Java 6 -server8.248.2215,1441240  0% 1% 0% 100%
 chameneos-redux 
Smalltalk VisualWorks60.0760.0622,8562515  0% 100% 0% 0%
Java 6 -server12.578.6441,2881756  37% 45% 15% 40%
 pidigits 
Smalltalk VisualWorks66.1566.1737,740899  0% 0% 0% 100%
Java 6 -server14.155.7950,5081816  49% 60% 52% 56%
 reverse-complement 
Smalltalk VisualWorks30.9130.92299,944754  0% 0% 0% 100%
Java 6 -server2.712.67475,908592  3% 1% 94% 3%
 k-nucleotide N = 2,500,000 reduced workload 
Smalltalk VisualWorks32.0232.02335,2921191  0% 0% 0% 100%
Java 6 -server5.752.54139,2241602  61% 59% 61% 58%
 binary-trees 
Smalltalk VisualWorks255.00255.00197,716722  0% 100% 0% 0%
Java 6 -server20.5316.18566,032603  13% 86% 16% 11%
 regex-dna 
Smalltalk VisualWorks352.15352.19299,340584  0% 0% 100% 0%
Java 6 -server26.6710.91681,824929  57% 68% 63% 55%
 fannkuch 
Smalltalk VisualWorks677.48677.4422,764772  0% 0% 100% 0%
Java 6 -server68.4719.0917,5841150  81% 97% 74% 99%
 mandelbrot 
Smalltalk VisualWorks593.02592.9922,776467  0% 0% 0% 100%
Java 6 -server42.0210.6966,984903  98% 98% 98% 99%
 n-body
Smalltalk VisualWorksFailed
 spectral-norm
Smalltalk VisualWorksFailed

 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