[
https://issues.apache.org/jira/browse/MATH-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428709#comment-13428709
]
Gilles commented on MATH-740:
-----------------------------
{noformat}
log and log10 (calls per timed block: 1000000, timed blocks: 100, time unit: ms)
name time/call std error total time ratio
difference
Math log(x) 3.61083035e-05 2.28393527e-06 3.6108e+03 1.0000e+00
0.00000000e+00
Math log10(x) 3.66085799e-05 3.22000007e-06 3.6609e+03 1.0139e+00
5.00276380e+01
StrictMath log(x) 9.51341413e-05 2.66850659e-06 9.5134e+03 2.6347e+00
5.90258378e+03
StrictMath log10(x) 1.23497329e-04 3.77763096e-06 1.2350e+04 3.4202e+00
8.73890257e+03
FastMath log(x) 6.35533555e-05 5.03781330e-06 6.3553e+03 1.7601e+00
2.74450520e+03
FastMath log10(x) 1.66252138e-04 6.30307785e-06 1.6625e+04 4.6043e+00
1.30143835e+04
FastMath log(10, x) 1.17000075e-04 3.14090930e-06 1.1700e+04 3.2403e+00
8.08917711e+03
{noformat}
This table shows that
# FastMath's log is about 1.7 times slower than Math's log
# FastMath's log10 is about 4.5 times slower than Math's log10
# FastMath's log(10, x), which calls log twice, is about 3.2 times slower than
Math's log10
Small note: the performance difference between Math's log and log10 is not
significant (in some runs, log is faster, in others log10 is faster).
> Some "FastMath" functions are slow
> ----------------------------------
>
> Key: MATH-740
> URL: https://issues.apache.org/jira/browse/MATH-740
> Project: Commons Math
> Issue Type: Wish
> Reporter: Gilles
> Priority: Minor
> Fix For: 3.1
>
>
> From the two benchmarks we currently have in "FastMathTestPerfomance", we
> have that the following functions are much slower in "FastMath" than in
> either "Math" or "StrictMath" (the performance *loss*, for each of the
> benchmarks, is given in parentheses):
> * log10 (46%, 36%)
> * log1p (68%, 112%)
> * tan (11%, 61%)
> * atan (26%, 125%)
> * atan2 (44%, 40%)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira