x64 Ubuntu : Intel® Q6600® quad-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 |
| fasta | 6× | ± | ± | |
| chameneos-redux | 7× | 1/2 | ± | |
| pidigits | 11× | ± | 1/2 | |
| reverse-complement | 12× | 1/2 | ± | |
| k-nucleotide | 13× | 2× | ± | 2,500,000 |
| binary-trees | 16× | 1/3 | ± | |
| regex-dna | 32× | 1/2 | 1/2 | |
| fannkuch | 35× | ± | ± | |
| mandelbrot | 55× | 1/3 | 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 |
|---|---|---|---|---|---|
| fasta | |||||
| Smalltalk VisualWorks | 47.28 | 47.27 | 22,712 | 1171 | 0% 100% 0% 0% |
| Java 6 -server | 8.24 | 8.22 | 15,144 | 1240 | 0% 1% 0% 100% |
| chameneos-redux | |||||
| Smalltalk VisualWorks | 60.07 | 60.06 | 22,856 | 2515 | 0% 100% 0% 0% |
| Java 6 -server | 12.57 | 8.64 | 41,288 | 1756 | 37% 45% 15% 40% |
| pidigits | |||||
| Smalltalk VisualWorks | 66.15 | 66.17 | 37,740 | 899 | 0% 0% 0% 100% |
| Java 6 -server | 14.15 | 5.79 | 50,508 | 1816 | 49% 60% 52% 56% |
| reverse-complement | |||||
| Smalltalk VisualWorks | 30.91 | 30.92 | 299,944 | 754 | 0% 0% 0% 100% |
| Java 6 -server | 2.71 | 2.67 | 475,908 | 592 | 3% 1% 94% 3% |
| k-nucleotide N = 2,500,000 reduced workload | |||||
| Smalltalk VisualWorks | 32.02 | 32.02 | 335,292 | 1191 | 0% 0% 0% 100% |
| Java 6 -server | 5.75 | 2.54 | 139,224 | 1602 | 61% 59% 61% 58% |
| binary-trees | |||||
| Smalltalk VisualWorks | 255.00 | 255.00 | 197,716 | 722 | 0% 100% 0% 0% |
| Java 6 -server | 20.53 | 16.18 | 566,032 | 603 | 13% 86% 16% 11% |
| regex-dna | |||||
| Smalltalk VisualWorks | 352.15 | 352.19 | 299,340 | 584 | 0% 0% 100% 0% |
| Java 6 -server | 26.67 | 10.91 | 681,824 | 929 | 57% 68% 63% 55% |
| fannkuch | |||||
| Smalltalk VisualWorks | 677.48 | 677.44 | 22,764 | 772 | 0% 0% 100% 0% |
| Java 6 -server | 68.47 | 19.09 | 17,584 | 1150 | 81% 97% 74% 99% |
| mandelbrot | |||||
| Smalltalk VisualWorks | 593.02 | 592.99 | 22,776 | 467 | 0% 0% 0% 100% |
| Java 6 -server | 42.02 | 10.69 | 66,984 | 903 | 98% 98% 98% 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! !