Gentoo : Intel® Pentium® 4 |
Read the FAQ! |
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.
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 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 | 2.0 | ~5.0 | ~1.3 | 14 |
| chameneos-redux | ||||
| fannkuch | 1.6 | ~2.6 | ~2.2 | |
| fasta | 2.0 | ~2.0 | ~1.4 | |
| k-nucleotide | ~21 | ~1.1 | ~2.7 | |
| mandelbrot | ~1.8 | ~2.1 | ~1.5 | |
| meteor-contest | ||||
| n-body | ~1.4 | ~2.2 | ~1.4 | |
| nsieve | 3.3 | 3.1 | 11.6 | |
| nsieve-bits | ~1.6 | ~2.0 | ~3.0 | |
| partial-sums | ~1.8 | ~2.5 | ~1.5 | |
| pidigits | ~5.3 | ~61 | ~2.4 | |
| recursive | 3.7 | ~4.1 | ~1.3 | 7 |
| regex-dna | ||||
| reverse-complement | ~35 | ~1.3 | ~2.6 | |
| spectral-norm | 1.9 | ~2.5 | ~1.4 | |
| startup | ~3.6 | ~1.4 | ||
| sum-file | ~6.1 | ~2.4 | ~2.4 | |
| thread-ring | ||||
"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! !