Compare the performance of Smalltalk GNU programs against some other language implementation, or check the Smalltalk Time and Memory measurements.

For more information about the Smalltalk implementation we measured see ↓ about Smalltalk GNU.

Compare to:

 Are the Smalltalk GNU programs better?

For each of one our benchmarks, a white bar shows which language implementation had the better time, and a black bar shows which had the better memory use.

 How many times better?

How many times faster or smaller are the Smalltalk GNU programs than the corresponding Perl programs?

Smalltalk GNU x times better
~ Perl x times better
Program & Logs  Faster  Smaller: Memory Use Smaller: GZip Bytes Reduced N
binary-trees2.0~5.0~1.3 14
chameneos-redux No program
fannkuch1.6~2.6~2.2
fasta2.0~2.0~1.4
k-nucleotide~21~1.1~2.7
mandelbrot~1.8~2.1~1.5
meteor-contest No program
n-body~1.4~2.2~1.4
nsieve3.33.111.6
nsieve-bits~1.6~2.0~3.0
partial-sums~1.8~2.5~1.5
pidigits~5.3~61~2.4
recursive3.7~4.1~1.3 7
regex-dnaFailed
reverse-complement~35~1.3~2.6
spectral-norm1.9~2.5~1.4
startup~3.6 ~1.4
sum-file~6.1~2.4~2.4
thread-ring  No Perl

 about Smalltalk GNU

"Design Principles Behind Smalltalk" by Daniel Ingalls

GNU Smalltalk version 3.0.2

Home Page: GNU Smalltalk : The Smalltalk for those who can type

Download: Downloading GNU Smalltalk


--enable-jit was not available for this build


We've made the Smalltalk code a little more generic by abstracting out these implementation specific details, these are read from the command line before each script:

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

!Tests class methodsFor: 'platform'!
arg
   ^Smalltalk arguments first asInteger! !

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

!Tests class methodsFor: 'platform'!
stdinSpecial
   ^self stdin bufferSize: 4096! ! 

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

!Tests class methodsFor: 'platform'!
stdoutSpecial
   ^self stdout bufferSize: 4096! !

!Stream methodsFor: 'platform'!
print: number digits: decimalPlaces
   | n s |
   n := 0.5d0 * (10 raisedToInteger: decimalPlaces negated).
   s := ((number sign < 0) ifTrue: [number - n] ifFalse: [number + n]) printString.
   self nextPutAll: (s copyFrom: 1 to: (s indexOf: $.) + decimalPlaces)! !

!Stream methodsFor: 'platform'!
print: number paddedTo: width
   | s |
   s := number printString.
   self nextPutAll: (String new: (width - s size) withAll: $ ), s! !

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

Revised BSD license