Open Bug 1934123 Opened 1 year ago Updated 1 year ago

Add a fuse for the existence of user access to Symbol.isConcatSpreadable

Categories

(Core :: JavaScript Engine, task, P5)

task

Tracking

()

People

(Reporter: mgaudet, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

If we add a fuse for this and add fuse telemetry (Bug 1877258) we can decide if we want a fuse based optimization for this.

(The check for concat spread has already been optimized, but with a fuse we could make a runtime-wide optimization)

(I suppose the alternative definition: "If user code ever creates a new property with the key Symbol.isConcatSpreadable" would also work)

(Evidence this could be valuable is that during an Sp3 run, there are 2.4 million checks involved in "IsConcatSpreadable")

Oh and out of all these checks, in Sp3 precisely zero ever said "yes, we have an isconcatspreadable"

Attached file stats.patch
(Current stats patch for the curious)

It's also maybe interesting to note that toStringTag and toPrimitive never seem to take this path?

To experiment if getting rid of the checks for IsConcatSpreadable would be valuable, I did a perf compare where I just commented out the checks. This would be the ideal outcome of a fuse optimization.

Results are pretty underwhelming -- almost no impact.

It seems that our current HasInterestingSymbol opt is pretty darn good, 2.4 million checks and all.

Severity: -- → N/A
Priority: -- → P5

Would be interesting to see if this helped a microbenchmark.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: