Inline some Date.prototype methods
Categories
(Core :: JavaScript Engine: JIT, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox133 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
Details
Attachments
(4 files)
Inline the following Date.prototype methods which are also inlined in both V8 and JSC:
Date.prototype.getTimeDate.prototype.getFullYearDate.prototype.getMonthDate.prototype.getDateDate.prototype.getDayDate.prototype.getHoursDate.prototype.getMinutesDate.prototype.getSeconds
JSC additionally inlines:
Date.prototype.getMillisecondsDate.prototype.getTimezoneOffsetDate.prototype.getYearDate.prototype.setTime- And all UTC getter methods.
But for now only inline the Date methods which are inlined in both V8 and JSC, so that users can expect similar performance numbers across engines.
| Assignee | ||
Comment 1•1 year ago
|
||
Inline for getTime for parity with V8 and JSC. Also enables inlining valueOf
and ThisTimeValue for free, because they return the same result as getTime.
| Assignee | ||
Comment 2•1 year ago
|
||
Used in the next parts.
| Assignee | ||
Comment 3•1 year ago
|
||
These functions return the cached local date-time values, so we just need
the DateFillLocalTimeSlots CacheIR op from part 2, followed by reading the
corresponding slot.
| Assignee | ||
Comment 4•1 year ago
|
||
The local time components aren't stored in separate slots, but instead in a
single slot which stores the number of seconds since the start of the year.
Comment 6•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/0ffb38da7876
https://hg.mozilla.org/mozilla-central/rev/64ed1e7ffcbc
https://hg.mozilla.org/mozilla-central/rev/12d75626c542
https://hg.mozilla.org/mozilla-central/rev/fb72a2390e63
Comment 7•1 year ago
|
||
Either this bug or bug 1925051 improved some test
Jetstream2
3.5%-~5% on date-format-tofte-SP-Average
37% on date-format-xparb-SP-Geometric
Sunspider
15% on date-format-xparb
Description
•