Closed Bug 1370210 Opened 7 years ago Closed 7 years ago

obj_propertyIsEnumerable calls non-inlined IsSymbolOrSymbolWrapper

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: anba, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

obj_propertyIsEnumerable calls ValueToId, which in turn calls IsSymbolOrSymbolWrapper, but IsSymbolOrSymbolWrapper isn't an inline function, maybe it should be?
Good find!

I think it would also be nice to instrument ValueToId to see what the hottest cases are. For instance having a v.isString() check + an inlined isAtom() call could be nice. ToAtom also isn't inlined...
Attached patch PatchSplinter Review
I instrumented the browser and on Speedometer > 80% of ValueToId calls have an atomized string. About 10% are non-atomized strings.

So here's a patch to handle these cases better in ValueToId and ValueToIdPure.

Not sure if we should make ValueToId MOZ_ALWAYS_INLINE...
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Attachment #8877684 - Flags: review?(andrebargull)
Blocks: 1245279
Attachment #8877684 - Flags: review?(andrebargull) → review?(evilpies)
Comment on attachment 8877684 [details] [diff] [review]
Patch

Stealing .. LGTM.
Attachment #8877684 - Flags: review?(evilpies) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1fd504b9feed
Optimize ValueToId and ValueToIdPure to check the common cases first. r=evilpie
https://hg.mozilla.org/mozilla-central/rev/1fd504b9feed
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: