4 ms·
Standard Java does not run at the speed of optimized C, except for a couple cherry-picked benchmarks.
by shaklee3 8y ago
Standard Java does not run at the speed of optimized C, except for a couple cherry-picked benchmarks.
- spricket 8y agoI converted the authors c version of the code to Java and ran it through JMH, on my machine it runs about 30% slower. (This is before he added the metaprogramming that essentially precalculates some of the matrices at compile-time). That's also without making any attempt at optimizing, basically a straight conversion that took ten minutes. It's not the speed of C but it's pretty close. And it has memory safety.
- shaklee3 8y agoWe can agree to disagree, but I don't consider 30% to be close. Maybe for applications that aren't time-sensitive, but I rarely deal with those.