Re:Google Introduces Portable Native Client
by RandallBrown on Saturday May 18, 2013 @07:13AM
(#5728535)
Why do you want Gotos? There is a small set of problems that is best solved by Gotos and even those can be solved with a less error prone method.
[ Parent
| on HN ]
Asm.js is a target language for compilers. That small set of problems that are best solved by gotos includes target languages for compilers.
Re:Google Introduces Portable Native Client
by pcwalton on Saturday May 18, 2013 @12:28PM
(#5729447)
The Relooper solves this problem for compilers, and it is extremely effective in practice. Besides, you can always solve the lack of goto with code duplication, with no loss in performance.
Except code duplication destroys performance because the instruction cache isn't infinite. I think we can agree that the relooper isn't the optimal solution to this problem...it's a compromise that works pretty well, but its a compromise nonetheless. It also means that you need to involve the LLVM toolchain anyway, just like in pnacl. I don't know if pnacl is a better solution or asm.js, but what I do know is that both are compromise and both have advantages and disadvantages.