/mobile Handheld Friendly website

÷

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

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

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


Look at speed another way - look at a box plot of Time-used data.

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

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

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

 Smalltalk VisualWorks used what fraction? used how many times more? 
Benchmark Time Memory Code
 spectral-norm±
 k-nucleotide1/2
 pidigits±1/3
 n-body±
 fasta±
 fannkuch-redux10×1/2
 fasta-redux13×±
 regex-dna15×1/21/2
 binary-trees17×1/2±
 reverse-complement17×1/2±
 mandelbrot24×1/21/2
 Smalltalk VisualWorks used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)10×16×24×24×

± 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 ~ speed and size.

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 spectral-norm 
Smalltalk VisualWorks91.1591.1738,028438  0% 0% 0% 100%
Java 7 -server16.9917.0018,244514  0% 0% 0% 100%
 k-nucleotide 
Smalltalk VisualWorks33.0033.03402,9001296  0% 0% 0% 100%
Java 7 -server3.994.10100,3802431  1% 0% 0% 98%
 pidigits 
Smalltalk VisualWorks49.3749.4348,060652  0% 0% 1% 100%
Java 7 -server6.006.0153,7681826  1% 0% 0% 100%
 n-body 
Smalltalk VisualWorks193.43193.4837,7561652  0% 0% 0% 100%
Java 7 -server22.5122.5116,9401424  0% 0% 0% 100%
 fasta 
Smalltalk VisualWorks47.2347.2437,7881315  0% 0% 0% 100%
Java 7 -server5.185.1918,0441507  1% 0% 1% 100%
 fannkuch-redux 
Smalltalk VisualWorks688.74688.9037,500838  0% 0% 0% 100%
Java 7 -server69.9669.9917,0201282  0% 0% 0% 100%
 fasta-redux 
Smalltalk VisualWorks33.6833.6939,8481772  0% 0% 0% 100%
Java 7 -server2.542.5417,2441443  1% 0% 0% 100%
 regex-dna 
Smalltalk VisualWorks351.79351.95321,132584  0% 0% 0% 100%
Java 7 -server22.9523.00561,4361284  0% 0% 0% 100%
 binary-trees 
Smalltalk VisualWorks272.31272.63207,456722  2% 1% 1% 100%
Java 7 -server16.4416.48499,416603  0% 0% 0% 100%
 reverse-complement 
Smalltalk VisualWorks30.7330.77314,068754  0% 0% 0% 100%
Java 7 -server1.791.83514,512745  2% 1% 2% 100%
 mandelbrot 
Smalltalk VisualWorks580.99581.1337,768467  0% 0% 0% 100%
Java 7 -server23.7423.7569,696796  0% 0% 0% 100%

 Step 4 : Are there other Smalltalk VisualWorks programs for these benchmarks?

Remember - those are just the fastest Smalltalk VisualWorks and Java 7 -server programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Smalltalk VisualWorks.

Maybe one of those other Smalltalk VisualWorks programs is fastest on a different OS/machine.

 Step 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Smalltalk VisualWorks and Java 7 -server programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.

Maybe one of those other programs is fastest on a different OS/machine.

 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(R) Personal Use Edition Release 7.8 of March 30, 2011

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

  Home   Conclusions   License   Help