4 ms·
Mostly what the benchmark shows is that the benchmark in question measures one specific thing which doesn't have a JIT fast path in Firefox yet, but measures it
by bzbarsky 9y ago
Mostly what the benchmark shows is that the benchmark in question measures one specific thing which doesn't have a JIT fast path in Firefox yet, but measures it multiple times in different ways...
[Edit: Actually two things: hot loops in the same function as a class definition, and derived classes that use "super".]
Chances are whatever you see on your app is a different issue. I'd be happy to profile and file bugs as needed if you can get me a link that shows the problem on your app.
- jfbastien 9y agoInteresting. What is that thing exactly? Is there a bug we can follow?
- bzbarsky 9y agoActually, I guess there are two things: 1) If you have a class definition inside a function, that function doesn't get jitted. The functions in the class definition itself can still get jitted. 2) Class methods that use super don't get jitted at the moment. So if your class definitions are not in the same function as your hot code and don't use super, you get fast paths. Otherwise some things will run in the interpreter. The tracking bug for this is https://bugzilla.mozilla.org/show_bug.cgi?id=1167472 https://bugzilla.mozilla.org/show_bug.cgi?id=1167472 and https://bugzilla.mozilla.org/show_bug.cgi?id=1167472#c13 https://bugzilla.mozilla.org/show_bug.cgi?id=1167472#c13 is what the above summary is based on.