Comparing of productivity of programs written on the Forth and the C

The remark: I'm not the author of these benchmarks! I only have ported them on SPF. The author of original shootout - Doug Bagley. The part of the code is taken from the Win32-port shootout.

The participants of competitions - VC6SP5; GCC-3.2-2; spf3.76-239; SPF4 build 11.

  VC(opt) VC GCC SPF3 SPF4 spf4/ c lider
Ackermann's Function0.0320.0870.036*0.0732.2
Array Access0.0400.2000.0284.2840.2017.1
Exception Mechanisms0.0640.0650.0580.6520.0731.2
Fibonacci Numbers0.1040.1540.1110.9430.1611.5
Hash Access0.5330.5770.5283.5750.3540.6
Hashes, Part II1.3971.8541.37920.3902.1721.5
Heapsort0.1210.1670.115*0.3192.7
Hello World1.2871.2821.6901.3111.4001.0
List Operations0.1160.1550.1020.7640.1261.2
Matrix Multiplication0.0630.2070.0882.3190.2113.3
Method Calls0.0610.1010.0500.9600.0951.9
Nested Loops0.0110.1810.0800.3000.21619.6
Object Instantiation1.0561.1271.1423.7431.7651.6
Random Number Generator0.0830.1000.040*0.0962.4
Sieve of Eratosthenes0.1680.5250.1681.7550.4462.6
String Concatenation0.0190.0150.0150.1050.0140.9
Reverse a File0.1930.2030.2361.0500.2651.3
Spell Checker0.6790.8400.8232.4120.7841.1
Sum a Column of Integers0.2610.2600.4755.3930.7262.7
Count Lines/Words/Chars0.3620.6800.3528.4110.3210.9
Sums:6.6508.7807.51658.3649.818 

Features of testing

The test platform - Microsoft WindowsXP, AMD Duron (Spitfire) 700MHz, L1 Cache 64Kb+64Kb, L2 Cache 64Kb, memory 128Mb.

VC was tested in two modes - with included optimization on speed and without.

SPF-versions of the tests were made on the basis of the tests for gcc and gforth.

There is not SPF3 test with floating point.

Download the tests and scripts (43K).

Download the data necessary for some tests (115K).