obj_propertyIsEnumerable calls non-inlined IsSymbolOrSymbolWrapper

RESOLVED FIXED in Firefox 56

Status

()

RESOLVED FIXED
a year ago
a year ago

People

(Reporter: anba, Assigned: jandem)

Tracking

(Blocks: 1 bug)

Trunk
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

a year ago
obj_propertyIsEnumerable calls ValueToId, which in turn calls IsSymbolOrSymbolWrapper, but IsSymbolOrSymbolWrapper isn't an inline function, maybe it should be?
(Assignee)

Comment 1

a year ago
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...
(Assignee)

Comment 2

a year ago
Created attachment 8877684 [details] [diff] [review]
Patch

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)
(Assignee)

Updated

a year ago
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+

Comment 4

a year ago
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

Comment 5

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/1fd504b9feed
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.