Closed
Bug 1451251
Opened 6 years ago
Closed 6 years ago
Add missing JS_INLINABLE_FN for some built-ins exposed to self-hosting code
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(1 file)
10.13 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
JS_INLINABLE_FN is missing for: - std_Array_join - std_String_toLowerCase - std_String_toUpperCase Supporting these functions improve this µ-benchmark from 450ms to 360ms for me: --- function f() { var q = 0; var t = dateNow(); for (var i = 0; i < 1000000; ++i) { q += "".toLocaleLowerCase("de-de").length; } return [dateNow() - t, q]; } --- And this one from 50ms to 30ms: --- function f() { var q = 0; var t = dateNow(); for (var i = 0; i < 1000000; ++i) { q += "".toLocaleLowerCase("de").length; } return [dateNow() - t, q]; } --- JS_INLINABLE_FN should also be supported for: - IsArrayBuffer - IsSharedArrayBuffer That will improve this µ-benchmark from 440ms to 390ms: --- function f() { var ab = new ArrayBuffer(8); var q = 0; var t = dateNow(); for (var i = 0; i < 1000000; ++i) { q += ab.slice(0).byteLength; } return [dateNow() - t, q]; } --- And this one from 285ms to 135ms: --- function f() { var ta = new Int32Array(16); ta.buffer; // IsSharedArrayBuffer is called if reified buffer is present. var q = 0; var t = dateNow(); for (var i = 0; i < 5000000; ++i) { q += ta.fill(i)[0]; } return [dateNow() - t, q]; } ---
Assignee | ||
Comment 1•6 years ago
|
||
Adds inlining support for the built-ins mentioned in comment #0. Also removes the unused "IsReadableStreamBYOBRequest", "IsPromiseObject", and "CallPromiseMethodIfWrapped" exports.
Attachment #8964805 -
Flags: review?(jdemooij)
Comment 2•6 years ago
|
||
Comment on attachment 8964805 [details] [diff] [review] bug1451251.patch Review of attachment 8964805 [details] [diff] [review]: ----------------------------------------------------------------- Good finds!
Attachment #8964805 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 3•6 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=be24138a88042e2a89b4a8d4b89ea04e0cf2c8ae
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ab684911d520 Inline more functions used for self-hosting. r=jandem
Keywords: checkin-needed
Updated•6 years ago
|
Priority: -- → P3
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ab684911d520
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•