Comment #7 on issue 3903 by [email protected]: Math.log10 is unexpectedly
slow
https://code.google.com/p/v8/issues/detail?id=3903
Re: #6: Both are fast approximations that involve a loss of precision; my
point was the performance difference should not be so significant. Part of
that is explained by Chrome 40's polyfill of Math.log10, but the Chrome
41/42 results indicate a disparity remains, compared to the relative and
absolute performance in other browsers.
Attaching updated test case. While not as useful as porting fdlibm's log
to JS, I ported a C log10 function to JS; this shows more consistent
performance across browsers. It is less precise and robust than fdlibm's
and is based off taylor polynomials and a LUT. I'm not suggesting this is
a contender for a fdlibm replacement, merely that it was something I
personally was able to port for comparison purposes.
Performance (OS X, Haswell):
Chrome: 5081 ms
Safari: 5845 ms
Firefox: 4432 ms
These results make the previous Math.log (not log10) performance of
Chrome/V8 in OS X seem even more anomalous. Why is Chrome only hitting
half the FLOPS of Safari/Firefox here? A separate issue vs. log10 perhaps,
assuming it can be replicated.
Attachments:
log_perf_sample.html 9.7 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.