Open Bug 1981874 Opened 2 months ago Updated 2 months ago

https://www.historicaltechtree.com/ spends time in js::jit::DoSpreadCallFallback calling into js::math_min

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

People

(Reporter: mstange, Unassigned)

References

(Blocks 1 open bug)

Details

Profile: https://share.firefox.dev/3Hprs94

This is a profile of panning around on https://www.historicaltechtree.com/ , especially in the areas where a lot of connecting lines are visible on the screen. I noticed that some of the time was spent in js::jit::DoSpreadCallFallback calling into js::math_min. I haven't looked at the JS but it sounds like they're doing Math.min(...someArray). Only half of the time in the spread call handling is spent in math_min so I maybe this can be tightened up a bit by not hitting IC fallback.

I haven't filed a bug about the map and find parts of the profile, which are actually a bigger bottleneck here.

Summary: https://www.historicaltechtree.com/ spends a lot of time in js::jit::DoSpreadCallFallback calling into js::math_min → https://www.historicaltechtree.com/ spends time in js::jit::DoSpreadCallFallback calling into js::math_min

Math.{min,max}(...args) is inlined when all elements in args are Int32 or Number values. Unless the initial args array has more than 375 (JIT_ARGS_LENGTH_MAX) elements (bug 1888418).

Blocks: sm-js-perf
Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.