News for hackers. Stuff that matters.
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.
Re:Asm.js Chess Battle by trymas on Wednesday November 11, 2015 @12:55AM (#10545054)
+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.

Re:Asm.js Chess Battle by cjbprime on Tuesday November 10, 2015 @09:00PM (#10544309)
Safari doesn't implement an asm.js backend, presumably?
Re:Asm.js Chess Battle by azakai on Wednesday November 11, 2015 @12:00AM (#10544910)
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
Re:Asm.js Chess Battle by azakai on Wednesday November 11, 2015 @12:47AM (#10545040)
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.