/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 Clean program used compared to the fastest C++ GNU g++ 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 Clean program used compared to the fastest C++ GNU g++ program.
| Clean used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| n-body | ± | ± | ± | |
| fannkuch-redux | ± | 1/2 | 1/2 | |
| spectral-norm | 2× | 2× | 1/2 | |
| fasta | 2× | 2× | ± | |
| mandelbrot | 2× | 1/97 | 1/2 | |
| binary-trees | 3× | ± | 1/2 | |
| reverse-complement | 3× | ? | 1/3 | |
| k-nucleotide | 13× | 15× | 1/2 | |
| Clean used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | ± | ± | ± | 2× | 3× | 4× | 13× |
± 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 Clean program are shown for comparison against measurements of the fastest C++ GNU g++ program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| n-body | |||||
| Clean | 22.13 | 22.14 | 336 | 1587 | 0% 0% 0% 100% |
| C++ GNU g++ | 19.30 | 19.31 | 424 | 1659 | 0% 0% 0% 100% |
| fannkuch-redux | |||||
| Clean | 67.44 | 67.46 | 592 | 725 | 0% 0% 0% 100% |
| C++ GNU g++ | 50.35 | 50.36 | 1,236 | 1440 | 0% 0% 0% 100% |
| spectral-norm | |||||
| Clean | 15.70 | 15.70 | 1,380 | 609 | 0% 0% 0% 100% |
| C++ GNU g++ | 9.99 | 10.00 | 756 | 1044 | 0% 0% 0% 100% |
| fasta | |||||
| Clean | 11.57 | 11.57 | 592 | 1420 | 0% 0% 0% 100% |
| C++ GNU g++ | 6.16 | 6.16 | 356 | 1266 | 0% 0% 0% 100% |
| mandelbrot | |||||
| Clean | 51.75 | 51.76 | 332 | 506 | 0% 0% 0% 100% |
| C++ GNU g++ | 24.28 | 24.29 | 32,300 | 1017 | 0% 0% 0% 100% |
| binary-trees | |||||
| Clean | 43.64 | 43.70 | 262,476 | 539 | 0% 0% 0% 100% |
| C++ GNU g++ | 17.23 | 17.29 | 296,252 | 892 | 0% 0% 0% 100% |
| reverse-complement | |||||
| Clean | 0.33 | 0.34 | 87,972 | 834 | 3% 3% 0% 100% |
| C++ GNU g++ | 0.12 | 0.12 | ? | 2275 | 8% 0% 0% 100% |
| k-nucleotide | |||||
| Clean | 125.07 | 128.14 | 2,097,540 | 1511 | 0% 0% 0% 100% |
| C++ GNU g++ | 9.85 | 9.87 | 142,124 | 3415 | 0% 0% 1% 100% |
| regex-dna | |||||
| C++ GNU g++ | 0.05 | 0.08 | ? | 695 | 11% 0% 0% 89% |
| fasta-redux | |||||
| C++ GNU g++ | 0.03 | 0.03 | ? | 1474 | 0% 0% 25% 100% |
| pidigits | |||||
| Clean | |||||
| C++ GNU g++ | 0.08 | 0.08 | ? | 682 | 0% 0% 0% 100% |
Remember - those are just the fastest Clean and C++ GNU g++ programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Clean.
Maybe one of those other Clean programs is fastest on a different OS/machine.
Remember - those are just the fastest Clean and C++ GNU g++ 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.
clm - Clean make - version 2.4
Home Page: Clean
Download: Download Clean
We've made the Clean programs a little more obvious by providing these library functions:
import StdEnv, ArgEnv // The first commandline arg (if it will convert to Int) otherwise 1 argi :: Int argi = if (argAsInt <= 0) 1 argAsInt where argv = getCommandLine argAsInt = if (size argv == 2) (toInt argv.[1]) 1 // Round to n decimal places & convert to String toStringWith :: !.Int !.Real -> {#Char} toStringWith n a # z = 10.0 ^(~ (toReal n)) # x = (0.5 * z) + abs a # (s,exp) = ndigits x z (entier x) (nsign a) 0 # (s,exp) = nzeros s exp True = s where nsign x = if (x<0.0) "-" "" ndigits x z i s exp | x<z = (s,exp) # x = (x - toReal i)*10.0 = ndigits x (z*10.0) (entier x) ((if (exp == -1)(s +++ ".") s) +++ toString i) (exp-1) nzeros s exp point | exp < ~n = (s,exp) | (exp == -1 && point) = nzeros (s +++ ".") exp False = nzeros (s +++ "0") (exp-1) point