Re:Unreal JavaScript
by jerf on Wednesday May 08, 2013 @10:27AM
(#5674278)
Yes and no... once you hit the
it becomes
all on one line for nearly the rest of the file. It might as well be bytecode. Actually many bytecodes are more understandable.
[ Parent
| on HN ]
Re:Unreal JavaScript
by MasterScrat on Wednesday May 08, 2013 @10:33AM
(#5674306)
No, it's still JavaScript. The fact that it's compressed or not human-readable doesn't make it bytecode.
"It might as well be bytecode."
So can you add some dynamic code into asm.js and expect same performance? Asm.js is an assembly that looks like JavaScript for compatibility and readability.
Re:Unreal JavaScript
by ndesaulniers on Wednesday May 08, 2013 @08:53PM
(#5678136)
No, asm.js code that parses successfully is compiled ahead of time. It is a strict subset of the JavaScript programming language. If you use parts other than the subset, it will fail to parse as valid asm.js code and revert to the interpreter/JITs.
Well yes, but the same is true of any minified JavaScript, handwritten or compiled. For example look at the output of the closure compiler minifier.
Minified Javascript does not operate on an enormous buffer of bytes, such that you get seven and eight digit numbers flying everywhere. It's still easier to understand and manipulate than ASM.
asm.js isn't just an evocative name, it's a reasonable description... it's assembly in Javascript.
Re:Unreal JavaScript
by mschuster91 on Wednesday May 08, 2013 @11:22AM
(#5674697)
THERE is the code. LOL, I actually did not spot it in the file and asked myself "just where the ... is the code"?