x64 Ubuntu : Intel® Q6600® one core |
This chart shows 3 comparisons - Time-used, Memory-used and Code-used.
Each chart bar shows, for one unidentified benchmark, how much the fastest Smalltalk VisualWorks program used compared to the fastest Java 6 -server program.
This table shows 3 comparisons - Time-used, Memory-used and Code-used.
Each table row shows, for one named benchmark, how much the fastest Smalltalk VisualWorks program used compared to the fastest Java 6 -server program.
| Smalltalk VisualWorks used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | Reduced N |
| k-nucleotide | 5× | 4× | ± | 2,500,000 |
| fasta | 6× | 2× | ± | |
| fannkuch | 9× | ± | ± | |
| pidigits | 10× | 2× | ± | |
| reverse-complement | 11× | 1/2 | ± | |
| regex-dna | 14× | 1/2 | 1/2 | |
| binary-trees | 14× | 1/3 | ± | |
| mandelbrot | 14× | 1/3 | 1/2 | |
| chameneos-redux | 14× | 1/2 | ± | |
± read the measurements and then read the program source code.
This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ~ CPU Load.
For each named benchmark, measurements of the fastest Smalltalk VisualWorks program are shown for comparison against measurements of the fastest Java 6 -server program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ~ CPU Load |
|---|---|---|---|---|---|
| k-nucleotide N = 2,500,000 reduced workload | |||||
| Smalltalk VisualWorks | 31.93 | 31.93 | 335,296 | 1191 | 0% 1% 0% 100% |
| Java 6 -server | 6.43 | 6.60 | 92,780 | 1602 | 0% 0% 0% 100% |
| fasta | |||||
| Smalltalk VisualWorks | 46.79 | 46.79 | 22,716 | 1171 | 0% 0% 0% 100% |
| Java 6 -server | 8.33 | 8.36 | 14,580 | 1240 | 0% 0% 0% 100% |
| fannkuch | |||||
| Smalltalk VisualWorks | 678.27 | 678.22 | 22,796 | 772 | 0% 0% 0% 100% |
| Java 6 -server | 72.68 | 72.68 | 17,460 | 1150 | 0% 0% 0% 100% |
| pidigits | |||||
| Smalltalk VisualWorks | 68.03 | 68.03 | 37,732 | 899 | 0% 0% 0% 100% |
| Java 6 -server | 6.93 | 6.96 | 18,020 | 938 | 0% 0% 0% 100% |
| reverse-complement | |||||
| Smalltalk VisualWorks | 30.97 | 30.97 | 299,940 | 754 | 0% 0% 0% 100% |
| Java 6 -server | 2.66 | 2.71 | 475,772 | 592 | 0% 1% 0% 97% |
| regex-dna | |||||
| Smalltalk VisualWorks | 349.49 | 349.48 | 299,348 | 584 | 0% 0% 0% 100% |
| Java 6 -server | 25.35 | 25.40 | 683,724 | 929 | 0% 0% 0% 100% |
| binary-trees | |||||
| Smalltalk VisualWorks | 255.48 | 255.46 | 197,720 | 722 | 0% 0% 0% 100% |
| Java 6 -server | 18.51 | 18.55 | 565,112 | 603 | 0% 0% 0% 100% |
| mandelbrot | |||||
| Smalltalk VisualWorks | 593.08 | 593.05 | 22,772 | 467 | 0% 0% 0% 100% |
| Java 6 -server | 41.28 | 41.29 | 66,940 | 903 | 0% 0% 0% 100% |
| chameneos-redux | |||||
| Smalltalk VisualWorks | 56.27 | 56.27 | 22,856 | 2515 | 0% 0% 0% 100% |
| Java 6 -server | 3.88 | 3.91 | 41,280 | 1756 | 0% 0% 0% 99% |
| n-body | |||||
| Smalltalk VisualWorks | |||||
| spectral-norm | |||||
| Smalltalk VisualWorks | |||||
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,Release 7.6 of March 3, 2008
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! !