/mobile Handheld Friendly website
x64 Ubuntu : Intel® Q6600® one core |
This chart shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.
Each chart bar shows, for one unidentified benchmark, how much the fastest Smalltalk VisualWorks program used compared to the fastest Java 7 -server program.
Look at speed another way - look at a box plot of Time-used data.
This table shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.
Each table row shows, for one named benchmark, how much the fastest Smalltalk VisualWorks program used compared to the fastest Java 7 -server program.
| Smalltalk VisualWorks used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| spectral-norm | 5× | 2× | ± | |
| k-nucleotide | 8× | 4× | 1/2 | |
| pidigits | 8× | ± | 1/3 | |
| n-body | 9× | 2× | ± | |
| fasta | 9× | 2× | ± | |
| fannkuch-redux | 10× | 2× | 1/2 | |
| fasta-redux | 13× | 2× | ± | |
| regex-dna | 15× | 1/2 | 1/2 | |
| binary-trees | 17× | 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) | 5× | 5× | 8× | 10× | 16× | 24× | 24× |
± read the measurements and then read the program source code.
This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ≈ CPU Load ~ speed and size.
For each named benchmark, measurements of the fastest Smalltalk VisualWorks program are shown for comparison against measurements of the fastest Java 7 -server program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| spectral-norm | |||||
| Smalltalk VisualWorks | 91.15 | 91.17 | 38,028 | 438 | 0% 0% 0% 100% |
| Java 7 -server | 16.99 | 17.00 | 18,244 | 514 | 0% 0% 0% 100% |
| k-nucleotide | |||||
| Smalltalk VisualWorks | 33.00 | 33.03 | 402,900 | 1296 | 0% 0% 0% 100% |
| Java 7 -server | 3.99 | 4.10 | 100,380 | 2431 | 1% 0% 0% 98% |
| pidigits | |||||
| Smalltalk VisualWorks | 49.37 | 49.43 | 48,060 | 652 | 0% 0% 1% 100% |
| Java 7 -server | 6.00 | 6.01 | 53,768 | 1826 | 1% 0% 0% 100% |
| n-body | |||||
| Smalltalk VisualWorks | 193.43 | 193.48 | 37,756 | 1652 | 0% 0% 0% 100% |
| Java 7 -server | 22.51 | 22.51 | 16,940 | 1424 | 0% 0% 0% 100% |
| fasta | |||||
| Smalltalk VisualWorks | 47.23 | 47.24 | 37,788 | 1315 | 0% 0% 0% 100% |
| Java 7 -server | 5.18 | 5.19 | 18,044 | 1507 | 1% 0% 1% 100% |
| fannkuch-redux | |||||
| Smalltalk VisualWorks | 688.74 | 688.90 | 37,500 | 838 | 0% 0% 0% 100% |
| Java 7 -server | 69.96 | 69.99 | 17,020 | 1282 | 0% 0% 0% 100% |
| fasta-redux | |||||
| Smalltalk VisualWorks | 33.68 | 33.69 | 39,848 | 1772 | 0% 0% 0% 100% |
| Java 7 -server | 2.54 | 2.54 | 17,244 | 1443 | 1% 0% 0% 100% |
| regex-dna | |||||
| Smalltalk VisualWorks | 351.79 | 351.95 | 321,132 | 584 | 0% 0% 0% 100% |
| Java 7 -server | 22.95 | 23.00 | 561,436 | 1284 | 0% 0% 0% 100% |
| binary-trees | |||||
| Smalltalk VisualWorks | 272.31 | 272.63 | 207,456 | 722 | 2% 1% 1% 100% |
| Java 7 -server | 16.44 | 16.48 | 499,416 | 603 | 0% 0% 0% 100% |
| reverse-complement | |||||
| Smalltalk VisualWorks | 30.73 | 30.77 | 314,068 | 754 | 0% 0% 0% 100% |
| Java 7 -server | 1.79 | 1.83 | 514,512 | 745 | 2% 1% 2% 100% |
| mandelbrot | |||||
| Smalltalk VisualWorks | 580.99 | 581.13 | 37,768 | 467 | 0% 0% 0% 100% |
| Java 7 -server | 23.74 | 23.75 | 69,696 | 796 | 0% 0% 0% 100% |
Remember - those are just the fastest Smalltalk VisualWorks and Java 7 -server 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 -server 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.
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) Personal Use Edition Release 7.8 of March 30, 2011
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! !