vs

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

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

(Memory use is only compared for tasks that require memory to be allocated.)


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Are the Smalltalk VisualWorks programs faster? Approximately.

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

(Memory use is only compared for tasks that require memory to be allocated.)

 Smalltalk VisualWorks used what fraction? used how many times more? 
Benchmark Time Memory Code
 binary-trees1/2±
 spectral-norm 1/2
 pidigits ±
 fannkuch-redux 1/2
 fasta 1/2
 k-nucleotide10×1/31/2
 n-body11× ±
 regex-dna15×1/21/2
 reverse-complement16×±±
 fasta-redux19× ±
 mandelbrot28× 1/2
 Smalltalk VisualWorks used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)10×15×27×28×

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

 3 : Are the Smalltalk VisualWorks programs faster? Measurements.

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 binary-trees 
Smalltalk VisualWorks65.6065.67316,312722  0% 0% 0% 100%
Java16.4116.44521,176584  0% 1% 1% 100%
 spectral-norm 
Smalltalk VisualWorks95.3495.4027,236438  0% 0% 0% 100%
Java16.3116.3120,440950  1% 1% 0% 100%
 pidigits 
Smalltalk VisualWorks27.2827.30177,184652  0% 0% 0% 100%
Java4.144.1421,844938  1% 0% 1% 100%
 fannkuch-redux 
Smalltalk VisualWorks601.47601.6121,952838  0% 0% 0% 100%
Java67.4867.5021,4481282  1% 1% 0% 100%
 fasta 
Smalltalk VisualWorks44.6344.6621,9561315  0% 1% 1% 100%
Java4.934.9327,6682457  0% 1% 0% 100%
 k-nucleotide 
Smalltalk VisualWorks313.19313.44343,3201153  0% 0% 0% 100%
Java31.1831.211,189,8121844  1% 1% 0% 100%
 n-body 
Smalltalk VisualWorks263.11263.2421,9561652  0% 0% 0% 100%
Java24.5024.5219,6361424  1% 0% 1% 100%
 regex-dna 
Smalltalk VisualWorks321.34321.47376,248584  0% 0% 0% 100%
Java22.1222.13564,9521377  2% 1% 1% 100%
 reverse-complement 
Smalltalk VisualWorks27.3927.42373,712754  0% 1% 1% 100%
Java1.691.69519,612745  0% 1% 0% 100%
 fasta-redux 
Smalltalk VisualWorks36.1736.1922,2161772  0% 0% 0% 100%
Java1.931.9321,6681443  3% 1% 1% 100%
 mandelbrot 
Smalltalk VisualWorks758.88759.1922,216467  0% 0% 0% 100%
Java26.9626.9859,240796  1% 0% 0% 100%

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

Remember - those are just the fastest Smalltalk VisualWorks and Java 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.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Smalltalk VisualWorks and Java 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 

"Ubiquitous Applications: Embedded Systems to Mainframe" pdf

"Smalltalk Reaches Crossroads in the Insurance Industry" pdf

"Design Principles Behind Smalltalk" pdf

VisualWorks® Personal Use Edition Release 7.9 of May 11, 2012

Home Page: Cincom Smalltalk™ VisualWorks

Download: VisualWorksl® Personal®Use

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.


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   Play