/mobile Handheld Friendly website

÷

 Step 1 : Are the programs faster? At a glance.

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 program used compared to the fastest Tcl program.


Look at speed another way - look at a box plot of Time-used data.

 Step 2 : Are the programs faster? Approximately.

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 program used compared to the fastest Tcl program.

  used what fraction? used how many times more? 
Benchmark Time Memory Code
  used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(CPU secs)       

± read the measurements and then read the program source code.

 Step 3 : Are the programs faster? Measurements.

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 program are shown for comparison against measurements of the fastest Tcl program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 spectral-norm 
No program
Tcl35.8118,592425  
 pidigits 
No program
TclFailed
 nsieve-bits 
No program
Tcl67.445,904424  
 fasta 
No program
Tcl12.633,168946  
 regex-dna 
No program
Tcl0.756,300373  
 binary-trees 
No program
Tcl7.083,256540  
 k-nucleotide 
No program
Tcl2.458,316561  
 partial-sums 
No program
Tcl0.343,264450  
 mandelbrot 
No program
Tcl11.483,376460  
 recursive 
No program
Tcl4.902,156461  
 n-body 
No program
Tcl33.851,4961454  
 reverse-complement 
No program
Tcl0.402,168343  
 nsieve 
No program
Tcl14.5911,620295  

 Step 4 : Are there other programs for these benchmarks?

Remember - those are just the fastest and Tcl programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for .

Maybe one of those other programs is fastest on a different OS/machine.

 Step 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest and Tcl 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

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! !

Revised BSD license

  Home   Conclusions   License   Help