| int types are in JS and have been since 1995, due to the bitwise logical and shift ops. arbitrary jumps are a deoptimizer and verifier hazard (Java's verifier had O(n^4) complexity DoS attack demo'd by Michael Franz and his group at UCI). Do not want. SIMD is coming and wanted in hand-coded JS too, not a bytecode issue per se. > What I don't understand is why Mozilla didn't define a bytecode and a to-JS compiler for it. Browsers without support would have been just as slow, but there would have been much more room for evolution. You mix speed ("just as slow" -- wait, we're fast at asm.js input, faster on startup than PNaCl -- did you read the post?) with "room for evolution". I just argued above that having two syntaxes hurts evolution. Please separate speed from evolution and address my argument. Mozilla is in no position, philosophically or market-share-wise, to "pull a Trojan". Also, my argument stands no matter who is making it. No ad hominem fallacies, please! |
That's like saying int64 is a subset of float64 because you can use two floats to encode it.
> arbitrary jumps are a deoptimizer and verifier hazard
True, this would be one of the decisions to be made when designing a bytecode format.
> You mix speed ("just as slow" -- wait, we're fast at asm.js input, faster on startup than PNaCl -- did you read the post?)
You misunderstood. Asm.js running on a browser that doesn't have support for it is just as slow as output from bytecode-to-JS compiler would be. And for browsers that do have support, both asm.js and a hypothetical bytecode would behave the same.
The major differences with a bytecode would be requiring two "executables" and a better semantic model.
Also, I'm not necessarily defending PNaCl itself, nor did I even bring it up.
> No ad hominem fallacies, please!
I'm not sure where you got that, the Trojan comment was meant positively.
I think it would be nice if Mozilla introduced a bytecode (superset of asm.js semantics), once asm.js itself was accepted.