Monday, August 14, 2006

Language performance

Since long time I wanted to answer a simple question: what is the difference in performance of different programming languages when solving numerical problems? I've read a lot about the subject on the web. Unfortunately, I found many different opinions.

Some people say Java is too slow for number crunching, others say it can be faster than plain C for some problems. Finally, I found some posts that claim that C# in .Net is faster than Java. Since I'm thinking to rewrite part of one of my codes I thought it would be a good idea to answer this question before starting my new project.

As first step, I decided to use a single benchmark focused on floating point operations. In Java, Scimark2 is the standard. There are also version for the other two languages (C and C#) that I used in my comparison.

After using Linux as my main desktop for the last 4 years, I moved back to Windows XP some weeks ago. That's why I also wanted to check the effect of the OS in the final performance. Finally, I wanted to check a wide range of C compilers, Java VMs, and .Net implementations (well, I only know two...).

TODO: Add results...
Scimark2 results in Windows XP Home SP2



Scimark2 results in Linux Fedora 5

No comments: