
Asm.js Speedups Everywhere - ndesaulniers
https://hacks.mozilla.org/2015/03/asm-speedups-everywhere/
======
cromwellian
Great seeing the improvements. I was initially a big skeptic of asm.js, but
for high performance c-translated code, it seems good enough now. A 1.5x hit
is a concern, but we've been paying these hits on the JVM and other languages
for years.

I'm still sad there's no SMP/multithreading yet, but SharedArrayBuffer looks
promising. The only thing missing is the fact that for GC'ed languages there's
no efficient translation yet (e.g. Java/GWT).

~~~
tambourine_man
You have a very fast GC'd language right there already, if you don't mind
writing javascript. I know it has won me over the years, once you know the
pitfalls to avoid.

~~~
TazeTSchnitzel
In this way, the browser is the ultimate platform:

* portable low-level, static code (asm.js translation)

* portable high-level, dynamic code (JS translation)

* interoperability between the two

* single set of APIs

* supported virtually everywhere

~~~
ori_b
In short, it's shit, but it's portable shit, polished with billions of dollars
of effort. It's useful, but that doesn't mean it doesn't smell.

~~~
CmonDev
When people are eating shit for years, they stop noticing the smell and some
even start claiming it has "the good parts" in it.

~~~
TazeTSchnitzel
That would imply the whole thing is shit, which it isn't.

~~~
CmonDev
[http://en.wikipedia.org/wiki/Fly_in_the_ointment](http://en.wikipedia.org/wiki/Fly_in_the_ointment)

------
mikerichards
I had never heard of the term "sea of nodes" architecture before. Here
[https://news.ycombinator.com/item?id=8118079](https://news.ycombinator.com/item?id=8118079)
is HN discussion about it.

~~~
sanxiyn
FIRM is a compiler library, like LLVM. Its difference is that it is written in
C, and that it uses sea of nodes.

[http://pp.ipd.kit.edu/firm/Features](http://pp.ipd.kit.edu/firm/Features)

------
nickysielicki
Am I the only one worried about the implications of asm.js and imminent close-
sourcing of the web?

I _don 't want_ bytecode in my browser. I barely like having some skiddie's
javascript in my browser as it is currently. The fact that I'm about to lose
the ability to even understand it is scary to me.

(Yes, I know people compile their JS currently... But that's relatively less
convoluted. and can be deconstructed to a degree. This is another level.)

~~~
dmm
The web is already closed-source. You can read gmail's js but you don't have
the right to modify or redistribute it.

~~~
nickysielicki
Freedom implies openness, but openness doesn't imply freedom.

Gmail's JS _is_ open, but it is not free.

~~~
dmm
Open source means you have the right to modify and redistribute. If you want
to express a different idea use a different term.

------
mcav
In this title, 'everywhere' means 'across browsers', not 'throughout all JS
execution'.

~~~
jbergens
It almost means the same. Node is using V8 (from Chrome). Not sure if Nashorn
has any asm.js optimizations but it will probably get it later if it is
important to many organizations. Those are probably the most commonly used js
engines out there.

~~~
ygra
Isn't node many, many versions of V8 behind Chrome? As far as I recall,
they're on an out-of-date, unsupported version of V8 and sometimes cherry-pick
patches from upstream, but that's about it.

