Comparing C/GPU vs C#/CPU on compression algos - that's really fresh imho.
10MB/s static huffman becomes fast.
Java would be better though - I've seen many reports that native java on linux works faster than C++ windows exe under wine.
Still not sure whether wine is that slow, process time is that wrong, some java engine stays after program quits to finish the cached
writes, or something else.
AFAIK java is slower than C#.
I'm doing some comparisons right now on my filesystem benchmark. It's clearly not a general-purpose comparison, but gcc 4.5.2 beats VC8 9:2 (tied in 5 tests). In that benchmark it always lost. So while it looked really interesting at first, now I have doubts that it's reliable.
There is a mistake in the benchmark. It shows that GCC is 34.8% slower than VS, but numbers (and chart) show that it's actually faster by ~1/3.
It looks much better now...though I would still like to know why is Java on Linux so much faster than on Windows. Was it even tested on the same box?
Last edited by m^2; 10th October 2011 at 13:15.
Well, that charts shows that Java on Linux was faster than anything on Windows Bear in mind that some tested programs uses C/ C++ libraries like GMP.
Some benchmarks like binary-trees are non representative, as C/ C++ versions use object pools but Java versions use normal allocation through 'new' operator. If we compare allocation through new and then garbage collection or manual deallocation, Java wins over C/ C++.
If you want actual numbers, look at: http://shootout.alioth.debian.org/u6...re-fastest.php
Today, on Linux at least, Haskell on GHC is almost as fast as C# on Mono and Lisp on SBCL is faster than both.
Comparing the medians:
1.05 for C
1.08 for C++
1.45 for warmed up Java 7
1.70 for cold Java 7
Overall it seems that for complex HPC Linux is the way to go (definitely not Windows) and the performance gains of C++ over Java do not offset the productivity deficits often. On the other hand Java still lacks unsigned numbers (WTF?) so for many tasks this can be too troublesome (as was in case of my QRotSort). And in case of relatively simple algorithms (eg below 100 KiB of raw C++ code) C++ is rather bearable and provides noticeable performance gains.
Last edited by Piotr Tarsa; 10th October 2011 at 18:02.