Closed Bug 1365387 Opened 7 years ago Closed 7 years ago

Avoid function name atomizing to improve performance of _FinishBoundFunctionInit

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

By popular demand (bug 1365361), improve the performance of _FinishBoundFunctionInit by delaying function name atomizing.
Attached patch bug1365387.patchSplinter Review
Improves this µ-benchmark from 180ms to 110ms for me:

function fn(){}
var t = Date.now();
for (var i = 0; i < 1000000; ++i) fn.bind();
print( Date.now() - t );
Attachment #8868264 - Flags: review?(till)
Blocks: 1365361
Comment on attachment 8868264 [details] [diff] [review]
bug1365387.patch

Review of attachment 8868264 [details] [diff] [review]:
-----------------------------------------------------------------

That's a surprisingly large win, thank you!
Attachment #8868264 - Flags: review?(till) → review+
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/228a1e9bcc4b
Optimize FinishBoundFunctionInit by delaying atomizing the function name. r=till
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/228a1e9bcc4b
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: