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 |
| chameneos-redux | 5× | ± | 2× | |
| binary-trees | 5× | 1/2 | ± | |
| k-nucleotide | 5× | 2× | ± | 2,500,000 |
| fasta | 6× | ± | ± | |
| spectral-norm | 7× | ± | 1/2 | |
| fannkuch | 9× | ± | ± | |
| reverse-complement | 9× | 1/2 | ± | |
| pidigits | 10× | 2× | ± | |
| regex-dna | 11× | 1/2 | 1/2 | |
| n-body | 13× | ± | ± | |
| mandelbrot | 25× | 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 |
|---|---|---|---|---|---|
| chameneos-redux | |||||
| Smalltalk VisualWorks | 60.92 | 60.91 | 12,772 | 2515 | 0% 0% 0% 100% |
| Java 6 -server | 12.45 | 12.47 | 17,876 | 1429 | 0% 0% 0% 100% |
| binary-trees | |||||
| Smalltalk VisualWorks | 146.17 | 146.17 | 121,992 | 722 | 0% 0% 0% 100% |
| Java 6 -server | 28.21 | 28.35 | 255,460 | 603 | 0% 0% 0% 99% |
| k-nucleotide N = 2,500,000 reduced workload | |||||
| Smalltalk VisualWorks | 30.32 | 30.32 | 164,696 | 1191 | 0% 0% 0% 100% |
| Java 6 -server | 5.51 | 5.55 | 70,048 | 1602 | 0% 0% 0% 99% |
| fasta | |||||
| Smalltalk VisualWorks | 47.45 | 47.45 | 12,756 | 1171 | 0% 0% 0% 100% |
| Java 6 -server | 7.50 | 7.51 | 12,248 | 1240 | 0% 0% 0% 100% |
| spectral-norm | |||||
| Smalltalk VisualWorks | 112.19 | 112.18 | 14,524 | 438 | 0% 0% 0% 100% |
| Java 6 -server | 15.91 | 15.93 | 12,564 | 950 | 0% 0% 0% 100% |
| fannkuch | |||||
| Smalltalk VisualWorks | 589.38 | 589.34 | 12,724 | 772 | 0% 0% 0% 100% |
| Java 6 -server | 66.79 | 66.83 | 13,796 | 1150 | 0% 0% 0% 100% |
| reverse-complement | |||||
| Smalltalk VisualWorks | 26.63 | 26.62 | 289,900 | 754 | 0% 0% 0% 100% |
| Java 6 -server | 2.86 | 2.90 | 473,280 | 592 | 0% 1% 0% 99% |
| pidigits | |||||
| Smalltalk VisualWorks | 56.84 | 56.84 | 32,936 | 899 | 0% 0% 0% 100% |
| Java 6 -server | 5.47 | 5.47 | 14,828 | 938 | 1% 3% 0% 100% |
| regex-dna | |||||
| Smalltalk VisualWorks | 317.68 | 317.67 | 296,396 | 584 | 0% 0% 0% 100% |
| Java 6 -server | 29.35 | 29.37 | 689,108 | 929 | 0% 0% 0% 100% |
| n-body | |||||
| Smalltalk VisualWorks | 324.46 | 324.44 | 12,800 | 1652 | 0% 0% 0% 100% |
| Java 6 -server | 25.05 | 25.08 | 12,412 | 1424 | 1% 0% 0% 100% |
| mandelbrot | |||||
| Smalltalk VisualWorks | 1,053.68 | 1,053.62 | 12,736 | 467 | 0% 0% 0% 100% |
| Java 6 -server | 41.56 | 41.57 | 48,900 | 903 | 0% 0% 0% 100% |
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! !