3 ms·
"We beat C" is a claim that goes hand in hand with "we are viable for scientific computing", so I'm always interested in hearing it (although more benchmarks wo
by neutronicus 16y ago
"We beat C" is a claim that goes hand in hand with "we are viable for scientific computing", so I'm always interested in hearing it (although more benchmarks would be nice).
- JoachimSchipper 16y agoI recall at least one old FORTRAN guy wandering into comp.lang.c who had very few good things to say about C's handling of floating-point calculations...
- neutronicus 16y agoI said "viable". Unfortunately, "Am I FORTRAN?" is the question that goes hand in hand with "Am I realistic for scientific computing". c'est la vie.
- igouy 16y agoN CPU Elapsed 500 0.07 0.22 3,000 2.34 2.41 5,500 7.86 8.01 Intel Fortran http://shootout.alioth.debian.org/u32/performance.php?test=spectralnorm http://shootout.alioth.debian.org/u32/performance.php?test=s...
- jedbrown 16y agoFloating point is not the problem, it's memory issues mostly due to C defaulting to allowing aliasing. C99 has the `restrict` keyword so you can generally get identical object code from both languages. SSE intrinsics are only available from C, you will either use them or assembly any time you care a lot about performance of tight kernels (very few nontrivial kernels are vectorized adequately by any of today's compilers).
- JoachimSchipper 16y agoAs I recall, this had very little to do with this guy complaints - it was a mixture of C allowing use of x87 80-bit-wide doubles and not allowing sufficient reordering of operations. That said, yes, restrict was added for this kind of thing.
- neutronicus 16y agox87 I'm sure he cackled into his pocket protector at the recent PHP/Java/gcc floating point parsing fiasco.