Closed
Bug 360484
Opened 18 years ago
Closed 18 years ago
[FIX]Make PRMJ_basetime faster
Categories
(Core :: JavaScript Engine, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Keywords: perf)
Attachments
(2 files)
(deleted),
patch
|
shaver
:
review+
|
Details | Diff | Splinter Review |
(deleted),
text/html
|
Details |
I'll attach a testcase on which we're pretty slow. It's one of the tests at <http://www.24fun.com/downloadcenter/benchjs/benchjs.html>.
I profiled it, and got:
Total hit count: 55549
Count %Total Function Name
41335 74.4 PRMJ_basetime
(that's _in_, not under; total hits under PRMJ_basetime are 45354, of which 3859 are under PRMJ_ToExtendedTime).
The problem is that the "compute the year" loop takes forever. Patch coming up that changes the profile on the same testcase to:
Total hit count: 14032, of which total hits under PRMJ_basetime are 3862, almost all of them under PRMJ_ToExtendedTime.
Assignee | ||
Updated•18 years ago
|
Assignee: general → bzbarsky
Blocks: 249546
Priority: -- → P1
Summary: Make PRMJ_basetime faster → [FIX]Make PRMJ_basetime faster
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Comment 1•18 years ago
|
||
Shaver, I did consider your suggestion that we compare to a known date like the beginning of 2000 or 2001 or something. Doing that made computing isleap kinda complicated, though, so I stuck with this. Assuming that LL_UDIVMOD is at all efficient (which it should be on any platform with HAS_LONG_LONG), it should be fine.
Attachment #245402 -
Flags: review?(shaver)
Assignee | ||
Comment 2•18 years ago
|
||
Assignee | ||
Comment 3•18 years ago
|
||
I ran the date tests at http://test.bclary.com/tests/mozilla.org/js/menu.html and this patch passes them all.
Comment on attachment 245402 [details] [diff] [review]
Proposed change
Looks right to me, though I admit I had to furrow my brow a bit to follow the math. I blame JSLL_*! r=shaver
Attachment #245402 -
Flags: review?(shaver) → review+
Assignee | ||
Comment 5•18 years ago
|
||
Fixed.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•