
IonMonkey now has Scalar Replacement and Branch Pruning optimizations - nbpname
https://blog.mozilla.org/javascript/2016/07/05/ionmonkey-evil-on-your-behalf/
======
ridiculous_fish
I'm working on some numerical code and this sounds like a relevant
optimization. How can I tell if my code is correctly taking advantage of it?

More generally, how should I optimize JS at the level of an individual
function? In C++ I would just inspect the emitted assembly code to understand
how my code is being compiled. But the assembly seems hard to access in a JS
world.

~~~
jwmerrill
There's some information about how to collect (and visualize!) JS compilation
artifacts in the IRHydra documentation [1]. It's v8 specific, though.

The other writings on that site are worth studying if you want to learn more
about how v8 optimizes code [2].

[1] [http://mrale.ph/irhydra/2/](http://mrale.ph/irhydra/2/)

[2] [http://mrale.ph](http://mrale.ph)

~~~
ridiculous_fish
Thanks for the links. Rebuilding V8 is a bit much though. Maybe this is an
opportunity for a web service akin to gcc.godbolt.org

------
nachtigall
What's the difference between IonMonkey and Firefox' SpiderMonkey?

~~~
dsp1234
IonMonkey is to SpiderMonkey as TurboFan[0] is to V8

[0] -
[https://github.com/v8/v8/wiki/TurboFan](https://github.com/v8/v8/wiki/TurboFan)

~~~
kannanvijayan
I'd compare IonMonkey in SM to Crankshaft in V8. Ion was actually started in
response to Crankshaft.

TurboFan is a new even-higher-tier, even-more-expensive-to-compile, but
potentialy even-more-optimized compiler backend the V8 team is working on.

