T
Twisted
In each of these two cases, would optimized C run substantially faster
than Java (hotspot or other JIT VM)?
* A number-crunching algorithm with a tight loop and a large number of
iterations (from
thousands potentially up to millions, or more) using doubles.
* Ditto, but with the C code using arrays of uints and carries to
effect a high precision
fixed-point math, and the Java code using BigDecimals.
* Ditto, but with roll-your-own Java BigDecimal-alikes using arrays and
math.
If there's an even higher performance option (short of compile-to-FPGA
) for the high-precision cases, please let me know about that as
well. (I know when it gets up into the 500+ digits it can be faster to
use FFT for the multiplies -- O(n log n) vs O(n^2). I'll cross that one
when I come to it.)
than Java (hotspot or other JIT VM)?
* A number-crunching algorithm with a tight loop and a large number of
iterations (from
thousands potentially up to millions, or more) using doubles.
* Ditto, but with the C code using arrays of uints and carries to
effect a high precision
fixed-point math, and the Java code using BigDecimals.
* Ditto, but with roll-your-own Java BigDecimal-alikes using arrays and
math.
If there's an even higher performance option (short of compile-to-FPGA
) for the high-precision cases, please let me know about that as
well. (I know when it gets up into the 500+ digits it can be faster to
use FFT for the multiplies -- O(n log n) vs O(n^2). I'll cross that one
when I come to it.)