Closed
Bug 424693
Opened 17 years ago
Closed 17 years ago
js_ComputeFilename accounts for 10-12% of date-format-tofte
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: sayrer, Assigned: igor)
Details
(Keywords: perf)
Attachments
(2 files, 1 obsolete file)
5.16 KB,
patch
|
shaver
:
review+
beltzner
:
approval1.9b5+
beltzner
:
approval1.9+
|
Details | Diff | Splinter Review |
930 bytes,
patch
|
Details | Diff | Splinter Review |
This test uses eval, and the filename/line# calculations are expensive there.
Reporter | ||
Updated•17 years ago
|
Target Milestone: --- → Future
Updated•17 years ago
|
Version: unspecified → Trunk
Assignee | ||
Comment 1•17 years ago
|
||
Judging by the code, I think the culprit is js_PCToLineNumber. It walks through all source notes of the script containing the eval to find the note that contains the given pc. A simple fix would be to embed the line number into JSOP_EVAL.
Assignee: general → igor
Assignee | ||
Comment 2•17 years ago
|
||
The patch introduces JSOP_LINENO and always generates the new bytecode after JSOP_EVAL. I use this independent bytecode and don't extend JSOP_EVAL with an extra 2 bytes to store lineno to avoid extra checks in the shared implementation of JSOP_CALL and JSOP_EVAL.
Attachment #311301 -
Flags: review?(shaver)
Assignee | ||
Comment 3•17 years ago
|
||
Attachment #311301 -
Attachment is obsolete: true
Attachment #311302 -
Flags: review?(shaver)
Attachment #311301 -
Flags: review?(shaver)
Comment 4•17 years ago
|
||
Comment on attachment 311302 [details] [diff] [review]
v1 for real
r=shaver, indeed. (The comment above JSXDR_BYTECODE_VERSION should really be changed, since we want to increment the second term, to decrement the expression's value!)
Attachment #311302 -
Flags: review?(shaver) → review+
Assignee | ||
Comment 5•17 years ago
|
||
Comment on attachment 311302 [details] [diff] [review]
v1 for real
Asking for approval: this is a safe optimization to avoid expensive calculations of the line number based on script's pc pointer.
Attachment #311302 -
Flags: approval1.9b5?
Attachment #311302 -
Flags: approval1.9?
Comment 6•17 years ago
|
||
Comment on attachment 311302 [details] [diff] [review]
v1 for real
a1.9b5=beltzner
Attachment #311302 -
Flags: approval1.9b5?
Attachment #311302 -
Flags: approval1.9b5+
Attachment #311302 -
Flags: approval1.9?
Attachment #311302 -
Flags: approval1.9+
Assignee | ||
Comment 7•17 years ago
|
||
I checked in the patch from the comment 4 to the trunk:
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&branch=HEAD&cvsroot=%2Fcvsroot&date=explicit&mindate=1206377895&maxdate=1206378079&who=igor%25mir2.org
Assignee | ||
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•17 years ago
|
||
In the checked in patch I have used // FALL THROUGH. This patch fixes this. I will check it in when the tree will be green.
Updated•17 years ago
|
Flags: in-testsuite-
Flags: in-litmus-
You need to log in
before you can comment on or make changes to this bug.
Description
•