Mr. Gann,
You mentioned that you were exploring different programming languages...and I ran across this post by the guy who wrote the optimization software I use, and I thought you might find it interesting (just as a general interest piece on the speed of different programming languages).
Sorry, I don't have your email address...so I'm posting here.
saxon
--------------------------------------------------------------------
While a programming language like C/C++ is probably the most widely used, many people assume that C++ is also the fastest.
Let's see if this is true?
I refer you to the following website:
http://dada.perl.it/shootout/index.html
The Great Win32 Computer Language Shootout
On this web-site 51 different languages are tested across 25 different benchmark tests to identify which language/compiler is truly the fastest.
The benchmark tests cover a broad spectrum including
Ackermann's function, Array access, count lines/words/chars, echo client server, exception mechanisms, fibonacci numbers,
hash access, heapsort, list operations, matrix multiplication, method calls, nested loops,
object instanttiation, producer/consumer threads, random number generation, regular expression matching
reverse a file, Sieve of Erathostenes, spell checking, statistical moments, string concatenation, sum a column of integers, word frequency count.
The results are categorised according to average CPU time used, Memory used and lines of code.
Since memory has become so cheap these days, memory and lines of code used is not so important as they used to be
during the 1990's and thus we will only look at the results of CPU time that will answer the important question we all want to know, which compiler is really the fastest?
Guess what, out of the 51 different compilers tested, the Borland Delphi compiler is the fastest!
Yes, it is even faster than all the different C++ compilers.
Below is the ranking for the top 5 as well as a few other important languages:
Compilers ranked according to lowest average CPU time:
1. Borland Delphi (Pascal)
2. Visual C++
3. Borland C++
4. Objective Caml compiler
5. Logiciels/Informatique lcc
11. Java
23. C#
30. Perl
49. VBScript
Apart from the above benchmarks, I had my own interesting experience.
As a hobby I am writing a chess program (No, it is not yet finished, but I have promised myself to continue one day
when I am finished with CASB, if that ever happens.....).
Anyway, while I myself had traditionally been a Pascal programmer, I initially wrote my chess program in Pascal.
However, while C/C++ is more widely used, I decided to rewrite/translate my whole chess program into C.
I was also hoping that I could gain some speed increase since C compilers had always been known for their speed.
Great was my dissappointment (after I have gone through all the trouble of converting my program into C) to realize that my original Pascal program, when compiled by the Delphi compiler, still outperformed the C++ version.
I tried every trick in the book to make my C program faster but still the Borland Pascal version remained the fastest.
In short, what have I learned from all of the above?
I learned that when looking for pure speed, then I could not find any compiler that could beat the Borland Delphi compiler in real-time applications where speed was most important.
Wouter (of Technovest)
You mentioned that you were exploring different programming languages...and I ran across this post by the guy who wrote the optimization software I use, and I thought you might find it interesting (just as a general interest piece on the speed of different programming languages).
Sorry, I don't have your email address...so I'm posting here.
saxon
--------------------------------------------------------------------
While a programming language like C/C++ is probably the most widely used, many people assume that C++ is also the fastest.
Let's see if this is true?
I refer you to the following website:
http://dada.perl.it/shootout/index.html
The Great Win32 Computer Language Shootout
On this web-site 51 different languages are tested across 25 different benchmark tests to identify which language/compiler is truly the fastest.
The benchmark tests cover a broad spectrum including
Ackermann's function, Array access, count lines/words/chars, echo client server, exception mechanisms, fibonacci numbers,
hash access, heapsort, list operations, matrix multiplication, method calls, nested loops,
object instanttiation, producer/consumer threads, random number generation, regular expression matching
reverse a file, Sieve of Erathostenes, spell checking, statistical moments, string concatenation, sum a column of integers, word frequency count.
The results are categorised according to average CPU time used, Memory used and lines of code.
Since memory has become so cheap these days, memory and lines of code used is not so important as they used to be
during the 1990's and thus we will only look at the results of CPU time that will answer the important question we all want to know, which compiler is really the fastest?
Guess what, out of the 51 different compilers tested, the Borland Delphi compiler is the fastest!
Yes, it is even faster than all the different C++ compilers.
Below is the ranking for the top 5 as well as a few other important languages:
Compilers ranked according to lowest average CPU time:
1. Borland Delphi (Pascal)
2. Visual C++
3. Borland C++
4. Objective Caml compiler
5. Logiciels/Informatique lcc
11. Java
23. C#
30. Perl
49. VBScript
Apart from the above benchmarks, I had my own interesting experience.
As a hobby I am writing a chess program (No, it is not yet finished, but I have promised myself to continue one day
when I am finished with CASB, if that ever happens.....).
Anyway, while I myself had traditionally been a Pascal programmer, I initially wrote my chess program in Pascal.
However, while C/C++ is more widely used, I decided to rewrite/translate my whole chess program into C.
I was also hoping that I could gain some speed increase since C compilers had always been known for their speed.
Great was my dissappointment (after I have gone through all the trouble of converting my program into C) to realize that my original Pascal program, when compiled by the Delphi compiler, still outperformed the C++ version.
I tried every trick in the book to make my C program faster but still the Borland Pascal version remained the fastest.
In short, what have I learned from all of the above?
I learned that when looking for pure speed, then I could not find any compiler that could beat the Borland Delphi compiler in real-time applications where speed was most important.
Wouter (of Technovest)

