Math.exact vs. ExactMath

Stefan Marr java at stefan-marr.de
Thu May 1 16:52:14 UTC 2014


Hi:

While trying to optimize some bits in TruffleSOM, I was looking through Java 8’s Math class which has a couple more operations covered than ExactMath, however a quick experiment indicates that Java 8’s Math class is not handled in the same way yet as ExactMath. At least a simple summation loop using addExact() was about 40% slower using Math instead of ExactMath.

Is it planed to provide the same support for Java 8’s Math class as there is for ExactMath in the short term?

Originally, I was actually looking for a bit shift with an exception on overflow, since it is used in the Mandelbrot benchmark.
But I guess, there are too few use cases to really worry about it.

Best regards
Stefan

-- 
Stefan Marr
INRIA Lille - Nord Europe
http://stefan-marr.de/research/





More information about the graal-dev mailing list