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× | ± | ± | |
| binary-trees | 7× | 1/2 | ± | |
| chameneos-redux | 7× | ± | 2× | |
| reverse-complement | 9× | 1/2 | ± | |
| pidigits | 11× | ± | 1/2 | |
| n-body | 13× | ± | ± | |
| k-nucleotide | 15× | ± | ± | 2,500,000 |
| regex-dna | 26× | 1/2 | 1/2 | |
| spectral-norm | 27× | ± | 1/2 | |
| fannkuch | 34× | ± | ± | |
| mandelbrot | 99× | 1/4 | 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.10 | 47.09 | 12,752 | 1171 | 0% 0% 0% 100% |
| Java 6 -server | 7.50 | 7.49 | 12,648 | 1240 | 0% 1% 99% 0% |
| binary-trees | |||||
| Smalltalk VisualWorks | 138.23 | 138.22 | 121,988 | 722 | 0% 1% 0% 100% |
| Java 6 -server | 29.63 | 19.18 | 289,920 | 603 | 24% 75% 27% 28% |
| chameneos-redux | |||||
| Smalltalk VisualWorks | 60.86 | 60.85 | 12,772 | 2515 | 0% 100% 0% 0% |
| Java 6 -server | 22.80 | 8.24 | 12,592 | 1377 | 50% 54% 84% 73% |
| reverse-complement | |||||
| Smalltalk VisualWorks | 26.69 | 26.69 | 289,904 | 754 | 100% 0% 0% 0% |
| Java 6 -server | 2.98 | 2.94 | 473,712 | 592 | 1% 94% 4% 2% |
| pidigits | |||||
| Smalltalk VisualWorks | 56.88 | 56.88 | 32,936 | 899 | 0% 0% 0% 100% |
| Java 6 -server | 12.95 | 5.00 | 28,624 | 1816 | 61% 59% 57% 55% |
| n-body | |||||
| Smalltalk VisualWorks | 325.56 | 325.54 | 12,796 | 1652 | 0% 100% 0% 1% |
| Java 6 -server | 25.03 | 25.03 | 12,408 | 1424 | 100% 0% 0% 0% |
| k-nucleotide N = 2,500,000 reduced workload | |||||
| Smalltalk VisualWorks | 30.21 | 30.21 | 164,696 | 1191 | 0% 0% 100% 0% |
| Java 6 -server | 6.17 | 2.07 | 145,296 | 1602 | 87% 67% 75% 69% |
| regex-dna | |||||
| Smalltalk VisualWorks | 316.57 | 316.58 | 296,392 | 584 | 100% 0% 1% 1% |
| Java 6 -server | 30.64 | 12.27 | 665,900 | 929 | 51% 54% 71% 74% |
| spectral-norm | |||||
| Smalltalk VisualWorks | 111.96 | 111.95 | 14,524 | 438 | 0% 0% 0% 100% |
| Java 6 -server | 15.95 | 4.11 | 12,552 | 950 | 97% 97% 98% 97% |
| fannkuch | |||||
| Smalltalk VisualWorks | 619.65 | 619.61 | 12,724 | 772 | 0% 1% 0% 100% |
| Java 6 -server | 66.26 | 18.43 | 13,776 | 1150 | 78% 77% 98% 99% |
| mandelbrot | |||||
| Smalltalk VisualWorks | 1,085.49 | 1,085.42 | 12,740 | 467 | 0% 0% 0% 100% |
| Java 6 -server | 43.12 | 10.95 | 48,920 | 903 | 98% 98% 99% 98% |
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(R) 7.6 Feb 14 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! !