Debian : AMD™ Sempron™ |
Read the FAQ! |
Compare the performance of Smalltalk GNU programs against some other language implementation, or check the Smalltalk CPU time and Memory use measurements.
For more information about the Smalltalk implementation we measured see ↓ about Smalltalk GNU.
For each of one our benchmarks, a white bar shows which language implementation had the faster program, and a black bar shows which used the least memory.
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-trees | ||||
| chameneos-redux | ||||
| fannkuch | 1.8 | ~2.4 | ~2.7 | 10 |
| fasta | 2.0 | ~2.1 | ~1.5 | |
| k-nucleotide | ~9.9 | ~1.2 | ~3.1 | |
| mandelbrot | ~1.1 | ~1.8 | ~1.8 | |
| n-body | 1.0 | ~3.6 | 9.4 | |
| nsieve | 2.4 | 3.2 | ~1.6 | |
| nsieve-bits | ~1.3 | ~2.8 | ~3.2 | |
| partial-sums | ~1.3 | ~2.0 | ~1.7 | |
| pidigits | ~20 | ~151 | ~1.5 | |
| recursive | 4.7 | ~7.5 | ~1.6 | 7 |
| regex-dna | ~4.5 | ~8.1 | ~1.2 | |
| reverse-complement | ~34 | ~1.3 | ~3.0 | |
| spectral-norm | 1.5 | ~1.5 | ~1.7 | |
| startup | ~11.8 | ~3.8 | ||
| sum-file | ~29 | ~1.2 | ~3.5 | |
| thread-ring | ||||
"Design Principles Behind Smalltalk" by Daniel Ingalls
GNU Smalltalk version 2.3.6
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! !