Linked by Christopher W. Cowell-Shah on Thu 8th Jan 2004 19:33 UTC
General Development This article discusses a small-scale benchmark test run on nine modern computer languages or variants: Java 1.3.1, Java 1.4.2, C compiled with gcc 3.3.1, Python 2.3.2, Python compiled with Psyco 1.1.1, and the four languages supported by Microsoft's Visual Studio .NET 2003 development environment: Visual Basic, Visual C#, Visual C++, and Visual J#. The benchmark tests arithmetic and trigonometric functions using a variety of data types, and also tests simple file I/O. All tests took place on a Pentium 4-based computer running Windows XP. Update: Delphi version of the benchmark here.
Permalink for comment
To read all comments associated with this story, please click here.
GCC 3.3.2 benchmark under Linux
by Pier Luigi Fiorini on Sat 10th Jan 2004 08:55 UTC

AthlonXP 1800+
512MB RAM
Gentoo 1.4 compiled with -mcpu=athlon-xp
Linux 2.4.23 + Con Kolivas patchset
# gcc -v
gcc version 3.3.2 20031201 (Gentoo Linux 3.3.2-r4, propolice)
# gcc -march=athlon-xp -mmmx -O3 Benchmark.c -s -o bench_c -lm
Start C benchmark
Int arithmetic elapsed time: 7950 ms with intMax of 1000000000
i: 1000000001
intResult: 1
Double arithmetic elapsed time: 7480 ms with doubleMin 10000000000.000000, doubleMax 11000000000.000000
i: 11000000000.000000
doubleResult: 10011632717.388229
Long arithmetic elapsed time: 18750 ms with longMin 1410065408, longMax 2
i: -1884901888
longResult: 776627965
Trig elapsed time: 4270 ms with max of 10000000
i: 10000000.000000
sine: 0.990665
cosine: -0.136322
tangent: -7.267119
logarithm: 7.000000
squareRoot: 3162.277502
I/O elapsed time: 1220 ms with max of 1000000
last line: abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz12345678 90abcdefgh
Total elapsed time: 39670 ms
Stop C benchmark