Re:Replacing JavaScript Hot Path with WebAssembly
by nicoburns on Thursday February 14, 2019 @05:30PM
(#19166694)
Weird that they didn't say which browser is which :/
[ Parent
| on HN ]
Re:Replacing JavaScript Hot Path with WebAssembly
by RivieraKid on Thursday February 14, 2019 @07:12PM
(#19167358)
Probably were worried it would look like they're trying to shame their business partners (Apple and Microsoft I guess).
Re:Replacing JavaScript Hot Path with WebAssembly
by acqq on Thursday February 14, 2019 @07:52PM
(#19167598)
Actually it seems that the second worst in JavaScript (when executing their example) is Chrome?
User robko here https://news.ycombinator.com/item?id=19167078 measured the code on node.js, and node.js is based on Chrome's V8 and he measured 1.5 sec vs article author's of around 2.7s, so it would seem that robko has some almost twice as fast CPU, and the other two (fast) JavaScripts are under 500 ms, and the slowest is 8 seconds, so V8 of Chrome remains the only candidate for the second worst performing of their example.
Re:Replacing JavaScript Hot Path with WebAssembly
by om2 on Friday February 15, 2019 @01:59AM
(#19169002)
I wish they had at east posted a browser-runnable version of their test so we could see for ourselves which browser is which, or compare JS vs WASM on our own systems. (On this type of code, I'd expect Safari to be the fastest, not Chrome.)
Re:Replacing JavaScript Hot Path with WebAssembly
by acqq on Friday February 15, 2019 @02:27AM
(#19169122)
See my "minimal" C++ translation in my other post here. There's not much to add. For JavaScript start with their code, but add the allocation, just replace allocations with
var a = new Uint32Array(height * width); and b the same. Add the timing (1), put in HTML and you're done. It's easy, just a few minutes for anybody who works with that (and this site should be filled with the competent developers AFAIK).
1) https://developer.mozilla.org/en-US/docs/Web/API/Performance
Re:Replacing JavaScript Hot Path with WebAssembly
by fireattack on Thursday February 14, 2019 @07:54PM
(#19167606)
They said it in the article:
>Note: Due to legal concerns, I won’t name any browsers in this article.
Re:Replacing JavaScript Hot Path with WebAssembly
by IshKebab on Friday February 15, 2019 @03:19AM
(#19169324)
What legal concerns? Companies benchmark their competitors all the time.
Re:Replacing JavaScript Hot Path with WebAssembly
by onli on Friday February 15, 2019 @05:44AM
(#19169878)
Yep. It's complete bullshit and it's a shame to see cowardice corporate legal fearmongering like this in a company like Google, that was once at the same wavelength as the technical/hacker community. As if Firefox, Microsoft or Apple would sue them for publishing one browser benchmark.
Even worse if it were a pretext to not make Chrome look bad.
Re:Replacing JavaScript Hot Path with WebAssembly
by eridius on Friday February 15, 2019 @02:41PM
(#19174042)
"Legal concerns" is a weird excuse, but personally, I'm glad they didn't name names. The point of this article isn't to shame any browser vendors, it's to talk about WebAssembly. Naming the browsers would have just distracted from the article's topic.