Hacker Newsnew | comments | show | ask | jobs | submit login

As someone who's been a vigorous proponent of (P)NaCl for a long time, I have to say that I'm excited to see this. If it can truly deliver on its promise (near-native-code speeds with no imposed GC overhead), it will be a truly welcome advance indeed.

I hope that if it does succeed that it will open up even more possibilities, like optional SSE/AVX intrinsics (for added speed in the most demanding software) and threading support.

It's great and educational to see an alternative approach to the problem that is obviously quite different than (P)NaCl. May the best technology win.




For much, NaCl has a 2x perf penalty (v. native C++), and PNaCl higher (compilation overhead, and compilation has a higher cost: delaying runtime from starting). asm.js already, despite being brand-new, for much has a 2x perf penalty: equal with NaCl, yet more portable. (See zlib, for an example of this.)

There are still cases where asm.js is slower (box2d, for example, though there it's broken JS through the point needed for 60fps), but I'd expect nothing but the difference to decrease. Unlike PNaCl, it's not mere research (after several years it's still not shipped), works cross-browser, and further unlike NaCl, works cross-platform.

I expect someone will write some binary serialization for asm.js: you have all the primitives for iadd, isub, etc.

-----


> For much, NaCl has a 2x perf penalty (v. native C++)

Huh? From the NaCl paper: "The worst case performance overhead is crafty at about 12%, with other benchmarks averaging about 5% overall."

How do you get from 5% to 2x (100%)?

> asm.js already, despite being brand-new, for much has a 2x perf penalty: equal with NaCl

Have you actually run the same benchmarks on both and found them equal?

According to this comment no such benchmarks have been performed yet (at least by azakai): http://news.ycombinator.com/item?id=5228737

If not, declaring it "equal" seems a bit premature.

-----




Guidelines | FAQ | Support | API | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: