What compiler/language combination is most efficient for π calculation?
Performance is measured is the number of seconds to compute 4m digits. Lower is better. All the source code used is available on the pi_css5 main page. All results are from a Compaq Evo N800W with 2.4GHZ Pentium 4m processor, and 1GB RAM.
Source for other languages is welcome, as are recommendations for other 'interesting' compilers/VMs.
Language | OS | Compiler | Performance | Options | |
C | Windows XP SP2 | Intel C++ 9.0 | 73.38 | /QxN /O3 /Qipo | |
C | Windows XP SP2 | Microsoft Visual C++ 2005 | 87.09 | /Ox /GL /arch:sse2 | |
C# | Windows XP SP2 | Microsoft Visual C# 2005 | 92.50 | /optimize+ | |
C# | Windows XP SP2 | Novell Mono 1.1.15 | 110.28 | /optimize+ | |
Java | Windows XP SP2 | Sun JDK 1.5.0re7 SE | 120.16 | /optimize+ |