IonMonkey now has Scalar Replacement and Branch Pruning optimizations
1–10 of 10 posts
Re: IonMonkey now has Scalar Replacement and Branch Pruning optimizations
#2Re: IonMonkey now has Scalar Replacement and Branch Pruning optimizations
#3What's the difference between IonMonkey and Firefox' SpiderMonkey?
(For entertainment purposes, the JITs have names ending in -Monkey.)
Re: IonMonkey now has Scalar Replacement and Branch Pruning optimizations
#4What's the difference between IonMonkey and Firefox' SpiderMonkey?
Re: IonMonkey now has Scalar Replacement and Branch Pruning optimizations
#5What's the difference between IonMonkey and Firefox' SpiderMonkey?
IonMonkey is to SpiderMonkey as TurboFan[0] is to V8 [0] - https://github.com/v8/v8/wiki/TurboFan
Re: IonMonkey now has Scalar Replacement and Branch Pruning optimizations
#6What's the difference between IonMonkey and Firefox' SpiderMonkey?
IonMonkey is to SpiderMonkey as TurboFan[0] is to V8 [0] - https://github.com/v8/v8/wiki/TurboFan
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.
Re: IonMonkey now has Scalar Replacement and Branch Pruning optimizations
#7More 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.
Re: IonMonkey now has Scalar Replacement and Branch Pruning optimizations
#8I'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.
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/
[2] http://mrale.ph
Re: IonMonkey now has Scalar Replacement and Branch Pruning optimizations
#9I'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.
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/ [2] http://mrale.ph
Re: IonMonkey now has Scalar Replacement and Branch Pruning optimizations
#10I'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.
The lastest solution I have seen so far is what we call the "Jit Coach" [2]. This is a devtools panel under the performance tab which reports if your function sticks in IonMonkey compiled code. Based on the MDN page this is behind a preference in "about:config".
When we compile, we record the hypothesis made by the compiler, and use these to annotate the deoptimization paths which are taken. Each time we jump back to Baseline the tool reports why we jump back to Baseline.
So far, only the front-end of IonMonkey and the deoptimization path are recorded. No other optimization phases are recorded at the moment. Sadly, it does not report the Assembly produced by IonMonkey.
[1] https://addons.mozilla.org/en-US/firefox/addon/jit-inspector...