Instead if using plain doubles, we can multiply every value by a constant factor—e.g. 1_000_000—and implement the algorithms on those integers and divide back to doubles when writing the results back.
ints use only 4 bytes instead of the 8 bytes for doubles
we lose precision and range of representable value (since we only have half the data available)
arithmetic on doubles is more expensive compared to arithmetic on integers
There should be JMH benchmarks to show the performance gains, if any.
Instead if using plain doubles, we can multiply every value by a constant factor—e.g. 1_000_000—and implement the algorithms on those integers and divide back to doubles when writing the results back.
There should be JMH benchmarks to show the performance gains, if any.