lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucenenet] NightOwl888 commented on issue #297: Investigate Performance of Math Functions in .NET Standard 2.1+
Date Wed, 16 Sep 2020 12:58:27 GMT

NightOwl888 commented on issue #297:
URL: https://github.com/apache/lucenenet/issues/297#issuecomment-693387353


   @jeme 
   
   Thanks for the info. These results are similar to the benchmark that I did earlier. I find
the results a bit surprising since Microsoft implemented these functions in C++, but apparently
ours are more efficient except for `Atanh`.
   
   When I posted this task, I was working under the assumption that these methods were being
used by other Lucene.NET components, thus having a potential impact on performance. But according
to code lens, the only methods that are referenced (other than in tests) are `Log(long, int)`
and `Gcd(long, long)`, neither of which have a counterpart in .NET. 
   
   `Gcd(long, long)` is the only one that actually has an impact in the latest codecs and
it has already been modified to use J2N's version of `TrailingZeroCount()` which will call
the hardware intrinsic method on .NET Core 3.x and Windows if we add a .NET Core 3.x target
framework to Lucene.NET.
   
   That being said, since there doesn't appear to be anything impactful we can improve on
`MathUtil` itself, we should focus our optimization efforts elsewhere.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message