[ 
https://issues.apache.org/jira/browse/MATH-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13652079#comment-13652079
 ] 

Jeff Hain commented on MATH-740:
--------------------------------


Nice :)


I used it at work too, but it wasn't called intensively enough
to be worth it (maybe because in some places I cached sin/cos
values along with angles, not to recompute them every time),
so I removed it.


I have a lot of fast geodetic code lying around, but I don't
think it's stable enough to be published, especially because
much methods have different flavors, depending on whether
you just specify angles (double), or angles + sin and cos
(not to recompute them inside), or angles + temporary DoubleWrapper
so that FastMath.sinAndCos(...) can be used, etc., and I'm still
wondering if I should cache sin/cos in angular classes and
use them instead of "double" (and just have one method), or
make them immutable with cached sin/cos lazily initialized,
etc.


-Jeff

                
> 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: 4.0
>
>         Attachments: jafamatests.zip
>
>
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to