Closed Bug 648698 Opened 13 years ago Closed 13 years ago

perhaps add fast call ic paths that handle arity mismatch

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: luke, Unassigned)

References

(Blocks 1 open bug)

Details

During a single run, v8-raytrace makes 1.2M mjit calls of which 320K (25%) have an arity mismatch.  This means we call stubs::FixupArity 320K times for an estimated total of 86ms (out of 500ms total) with the average FixupArity call taking 698 cycles (via rdtsc).  The potential speedup is even greater since an arity mismatch takes the slowest ic path.

I haven't studied whether v8-raytrace contains polymorphic call sites or not but, in the best case it seems like we could generate a fast path that isn't much slower than our fastest call path.  It also seems like this optimization would benefit the real webz too since I think what v8-raytrace is doing:
  function foo() { bar.apply(y, arguments) }
seems to be a real pattern that shows up.
Oops, that was a debug build.  The % arity-mismatch calls is still high, but an opt build only shows ~4.7ms out of ~110ms (or less, depending on how much of that is rdtsc).  Not trivial, but not such a big deal.
Blocks: crockmark
IonMonkey will handle differently.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.