News for hackers. Stuff that matters.
Re:Google Introduces Portable Native Client by tomjen3 on Saturday May 18, 2013 @03:08AM (#5728138)
Asm can't do nearly as much code optimizing as pnacl.
Re:Google Introduces Portable Native Client by Groxx on Saturday May 18, 2013 @05:09AM (#5728326)
this seems like a strange assertion to me. why not? you can do amazing things with static analysis and runtime optimization, and that operates on the AST / some intermediate state, not the source code. if anything, higher-level languages (ie, JS as opposed to bytecode) lend themselves to more automatic-optimizations than lower-level ones because intent is encoded better.
Re:Google Introduces Portable Native Client by jules on Saturday May 18, 2013 @10:23AM (#5728984)
Asm.js is lower level than LLVM IR. In LLVM IR the data structures and memory allocation are still visible, in asm.js it's just opaque code working on a giant heap array. For example think how you'd do pointer analysis on asm.js...
Re:Google Introduces Portable Native Client by pcwalton on Saturday May 18, 2013 @12:20PM (#5729425)
The optimizations are already done ahead of time, by Emscripten. There is no need to do them on the client, and doing so just increases compilation time for no reason.

In fact, shipping the types to the client is harmful, because it increases the download size. This is one of the ways asm.js is, IMHO, a better bytecode than LLVM IR…

Re:Google Introduces Portable Native Client by Zarel on Tuesday May 28, 2013 @01:15AM (#5778218)
> In fact, shipping the types to the client is harmful, because it increases the download size

To be fair, it's probably negligible compared to the download size impact of representing bytecode in a subset of JavaScript.