commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: FastMathTestPerformance results misleading
Date Fri, 01 Apr 2011 00:37:18 GMT
On 1 April 2011 01:23, Bill Rossi <bill@rossi.com> wrote:
>
> This test shows that Math.sin() is faster than FastMath.sin(), but this is
> misleading because the test operates over the domain 0 < x <1, whereas legal
> arguments to sin() are all finite numbers.   In particular, its when |x| is
> large that performance of the Math trig functions really drops off.

Good catch, for example:

Name     StrictMath      FastMath          Math
sin      128    1.0    238 1.8512     85 0.6620            <= current
sin     1331    1.0    601 0.4518   1365 1.0260          <= 0 -> 10000000

There are probably quite a few other tests that exhibit the same problem.

>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message