If you're using Math.hypot in hot code paths, do you know how slow it is? I'm profiling some JS in @ChromeDevTools and Math.hypot(x, y) is eating a huge chunk of time. Math.sqrt(x*x + y*y) is over 50x faster (!!) with a million iterations. (x*x + y*y) ** 0.5 is a bit faster still
-
-
Thanks
@mathias, I wouldn't have considered this a "bug" per se if you hadn't suggested it. Filed! https://bugs.chromium.org/p/chromium/issues/detail?id=979893 … -
Thanks again for filing that. A fix by
@bmeurer is in flight: https://chromium-review.googlesource.com/c/v8/v8/+/1684178 … - 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.