4 ms·
That's a good link. The n-body and spectral-norm benchmarks were fastest in Fortran. The fannkuch benchmark was fastest in Ada. The Mandlebrot benchmark was fas
by peter_lawrey 15y ago
That's a good link. The n-body and spectral-norm benchmarks were fastest in Fortran. The fannkuch benchmark was fastest in Ada. The Mandlebrot benchmark was fastest in ATS.
In each case, the language has pointers, however they were not used in the core part of the benchmark. i.e. they didn't get their speed advantage from pointers.
Haskell was the fastest for the thread-ring benchmark, it doesn't have pointers.
If Java had pointers as it does in the sun.misc.Unsafe utility class some code would be faster, but I don't believe this explains why Java is not the fastest in each benchmark. ;)
Object orientated programming is used in a significant portion of all programs, it would be interesting how C/C++ performs in such benchmarks. ;)
- igouy 15y ago>>That's a good link.<< Those measurements for programs forced to use just one core on a quad-core machine, you may also be interested in the measurements made when the programs are allowed to use all the cores - http://shootout.alioth.debian.org/u32q/which-programming-languages-are-fastest.php http://shootout.alioth.debian.org/u32q/which-programming-lan... and also measurements made on x64 http://shootout.alioth.debian.org/u64q/which-programming-languages-are-fastest.php http://shootout.alioth.debian.org/u64q/which-programming-lan... >>The n-body and spectral-norm benchmarks were fastest in Fortran.<< Maybe we should wonder if the Intel C++ compiler would produce programs comparable to those from the Intel Fortran compiler ;-) >>Object orientated programming is used in a significant portion of all programs, it would be interesting how C/C++ performs in such benchmarks.<< Maybe you're suggesting that OO C++ programs wouldn't perform as well as Java programs? But doesn't that highlight the advantage of being able to write programs in different styles?
- peter_lawrey 15y agoI agree, I am suggesting that "no pointer = no speed" is not demonstrated by the benchmarks provided. The developers who wrote the benchmarks which were faster than the C/C++ ones didn't appear to agree. i.e. when they has the optional to use them, they didn't and were still faster.