4 ms·
I have never seen such a speed difference. Can you reference anything?
by beza1e1 16y ago
I have never seen such a speed difference. Can you reference anything?
- gaius 16y agoBenchmarks we did at my last company (trading app in C++). But like I say, try it for yourself. There's a reason people still pay $$$ for compilers when GCC is free!
- beza1e1 16y agoWell, i am doing compiler research, which means testing is mostly SPEC CPU. Sometimes i wonder if those measurements show reality, because every serious compiler is heavily optimized for these special cases. There is no 2x difference there.
- gaius 16y agoCalculating yield curves is pretty "real world", as is transactions/sec. If the benchmark is representative, then it is a good benchmark, and if the compiler is optimized for it, then it is optimzed for real world use cases too.
- acqq 16y agoYou should definitely measure something from the real life. I measure something as simple as a loop in which some short floating point calculations is made (actually only two additions per loop and one FP comparison) and my measurements on the latest Intel i5 give (in seconds): 0.31 VS2010 -O2 SSE2 0.35 VC 6 -O2 0.44 cygwin gcc-4.3.2 -O2 0.95 cygwin gcc-3.4.4 -O2 I haven't tested the later 4.x gcc but the results are clear -- even VC 6, 12 years old, is better than a quite recent gcc, at least for FPU calculations.
- MatzeB 16y agogcc 3.X is also really old by now. Apart from that you should really use -O3 -march=native -msse2 -fomit-frame-pointer for best gcc performance. Anyway at some point you have to look at the generated assembly to really know what is going on.
- astrange 16y ago-march=native implies -msse2 (when possible). You might have meant -mfpmath=sse. -fomit-frame-pointer is probably not the default in VC6, so that might be unfair. (It actually is the default for linux and darwin now, because DWARF unwind tables obsolete frame pointers for most uses.)