/mobile Handheld Friendly website
x64 Ubuntu : Intel® Q6600® one core |
Each chart bar shows, for one unidentified benchmark, how much the fastest Smalltalk VisualWorks program used compared to the fastest Java 7 program.
These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.
Each table row shows, for one named benchmark, how much the fastest Smalltalk VisualWorks program used compared to the fastest Java 7 program.
| Smalltalk VisualWorks used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| pidigits | 2× | ± | 1/3 | |
| binary-trees | 5× | 1/2 | ± | |
| spectral-norm | 5× | 2× | ± | |
| k-nucleotide | 7× | ± | ± | |
| n-body | 9× | 3× | ± | |
| fasta | 9× | 2× | ± | |
| fannkuch-redux | 10× | 2× | 1/2 | |
| fasta-redux | 13× | 2× | ± | |
| regex-dna | 15× | 1/2 | 1/2 | |
| reverse-complement | 17× | 1/2 | ± | |
| mandelbrot | 24× | 1/2 | 1/2 | |
| Smalltalk VisualWorks used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | 2× | 2× | 6× | 9× | 14× | 24× | 24× |
± read the measurements and then read the program source code.
These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.
For each named benchmark, measurements of the fastest Smalltalk VisualWorks program are shown for comparison against measurements of the fastest Java 7 program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| pidigits | |||||
| Smalltalk VisualWorks | 11.25 | 11.27 | 43,644 | 652 | 0% 0% 0% 100% |
| Java 7 | 5.90 | 5.91 | 63,344 | 1826 | 0% 0% 0% 100% |
| binary-trees | |||||
| Smalltalk VisualWorks | 81.40 | 81.49 | 320,668 | 722 | 0% 0% 0% 100% |
| Java 7 | 16.37 | 16.42 | 499,404 | 603 | 0% 1% 0% 100% |
| spectral-norm | |||||
| Smalltalk VisualWorks | 91.03 | 91.05 | 42,880 | 438 | 0% 0% 0% 100% |
| Java 7 | 17.00 | 17.00 | 18,320 | 514 | 0% 0% 0% 100% |
| k-nucleotide | |||||
| Smalltalk VisualWorks | 343.20 | 343.48 | 380,852 | 1153 | 0% 0% 0% 100% |
| Java 7 | 50.50 | 50.55 | 451,208 | 1602 | 0% 0% 0% 100% |
| n-body | |||||
| Smalltalk VisualWorks | 192.75 | 192.80 | 42,880 | 1652 | 0% 0% 0% 100% |
| Java 7 | 22.51 | 22.52 | 17,016 | 1424 | 0% 0% 0% 100% |
| fasta | |||||
| Smalltalk VisualWorks | 47.24 | 47.25 | 41,284 | 1315 | 0% 0% 0% 100% |
| Java 7 | 5.18 | 5.19 | 18,132 | 1507 | 0% 0% 0% 100% |
| fannkuch-redux | |||||
| Smalltalk VisualWorks | 690.23 | 690.38 | 42,580 | 838 | 0% 0% 0% 100% |
| Java 7 | 70.18 | 70.20 | 17,168 | 1282 | 0% 0% 0% 100% |
| fasta-redux | |||||
| Smalltalk VisualWorks | 33.30 | 33.31 | 41,280 | 1772 | 0% 0% 0% 100% |
| Java 7 | 2.55 | 2.56 | 17,264 | 1443 | 1% 1% 0% 100% |
| regex-dna | |||||
| Smalltalk VisualWorks | 350.71 | 350.97 | 356,756 | 584 | 0% 0% 0% 100% |
| Java 7 | 23.11 | 23.17 | 561,732 | 1284 | 0% 0% 0% 100% |
| reverse-complement | |||||
| Smalltalk VisualWorks | 31.10 | 31.13 | 331,836 | 754 | 0% 0% 0% 100% |
| Java 7 | 1.79 | 1.83 | 514,504 | 745 | 0% 1% 0% 99% |
| mandelbrot | |||||
| Smalltalk VisualWorks | 578.00 | 578.16 | 42,596 | 467 | 0% 0% 0% 100% |
| Java 7 | 23.79 | 23.80 | 69,816 | 796 | 0% 0% 0% 100% |
Remember - those are just the fastest Smalltalk VisualWorks and Java 7 programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Smalltalk VisualWorks.
Maybe one of those other Smalltalk VisualWorks programs is fastest on a different OS/machine.
Remember - those are just the fastest Smalltalk VisualWorks and Java 7 programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.
Maybe one of those other programs is fastest on a different OS/machine.
"Ubiquitous Applications: Embedded Systems to Mainframe" pdf
"Smalltalk Reaches Crossroads in the Insurance Industry" pdf
"Design Principles Behind Smalltalk" pdf
VisualWorks® Personal Use Edition Release 7.9 of May 11, 2012
Home Page: Cincom Smalltalk™ VisualWorks
Download: VisualWorksl® Personal®Use
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.
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! !