Re:Bringing Asm.js to Chakra and Microsoft Edge
by nothrabannosir on Thursday May 07, 2015 @03:34PM
(#9507680)
I see, you were not talking about errors, but about predictability of performance. I see it now in your comment, too. Sorry for the misunderstanding.
And I didn't know it was just derived from it; I thought asm.js was idempotent with llvm ir!
Re:Bringing Asm.js to Chakra and Microsoft Edge
by pcwalton on Thursday May 07, 2015 @03:53PM
(#9507813)
> And I didn't know it was just derived from it; I thought asm.js was idempotent with llvm ir!
LLVM IR is SSA and strongly typed, while asm.js is non-SSA and only has a simple, machine-level type system, just to name two large differences.
You make a good point though; it's not like we are seeing helpful warnings when writing our frontend JS apps. But those warnings are still crucial when actually building & deploying stuff; with various tooling and browsers it's really nice to see a "successful asm.js compilation" message and you know it's working. If you upgrade a tool, you can be sure that it's still working, etc.
Also, it's not uncommon for people to write new languages or compilers and having that feedback that you are on the fast path is really nice.
I think your point has some merit though.
The other benefit to AOT is simply that, when the app starts running, it immediately starts running in the fast path.