Re:Asm.js Chess Battle
by TazeTSchnitzel on Tuesday November 10, 2015 @08:56PM
(#10544295)
Interestingly, asm.js has an advantage in Firefox and Chrome for me, but not in Safari.
[ Parent
| on HN ]
+1
I played 4 times on Safari with varying settings and it always converged into 50%/50% play ending in a draw.
Whereas in Firefox or Chrome sometimes even after 10-15 turns, the asm.js version had 98-100% chance of winning.
Safari doesn't implement an asm.js backend, presumably?
That's correct, all JS engines except for Safari's detect "use asm".
More specifically, Firefox and Edge detect "use asm" and run an asm.js type-checker, while Chrome detects "use asm" and runs TurboFan.
Re:Asm.js Chess Battle
by TazeTSchnitzel on Tuesday November 10, 2015 @09:47PM
(#10544497)
Nor does Chrome, but I think Chrome takes the `"use asm";` as a hint to use certain optimisations.
Re:Asm.js Chess Battle
by brendandahl on Tuesday November 10, 2015 @10:37PM
(#10544694)
Chrome should enable turbo fan with the "use asm"; set. Though the only confirmation of this is saying it's tested in beta. https://code.google.com/p/v8/issues/detail?id=2599#c77
It's in release Chrome currently.
Re:Asm.js Chess Battle
by brandonbloom on Tuesday November 10, 2015 @09:01PM
(#10544318)
Or, potentially, does an equally good job optimizing the code with or without the asm.js hint.