Closed
Bug 976596
Opened 10 years ago
Closed 10 years ago
Block-scoped variables indexing refactor
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: wingo, Assigned: wingo)
Details
Attachments
(1 file)
18.94 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
This is a followup to bug 962599 comment 26, to refactor some namings in block scope objects.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → wingo
Assignee | ||
Updated•10 years ago
|
Attachment #8381463 -
Flags: review?(luke)
Comment 2•10 years ago
|
||
Comment on attachment 8381463 [details] [diff] [review] Block-scoped variables indexing refactor Review of attachment 8381463 [details] [diff] [review]: ----------------------------------------------------------------- Great! ::: js/src/vm/ScopeObject.h @@ +410,1 @@ > return propertyCount(); I was just looking at this and I was astounded to see that propertyCount() is O(n)! Could you add a // TODO: propertyCount() is O(n), use O(1) lastProperty()->slot() instead here? (Even worse, numVariables() is used in loop conditions, making the loops O(n^2)!)
Attachment #8381463 -
Flags: review?(luke) → review+
Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Luke Wagner [:luke] from comment #2) > I was just looking at this and I was astounded to see that propertyCount() > is O(n)! Yuck! Good catch. Added the comment.
Assignee | ||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f05165839760
https://hg.mozilla.org/mozilla-central/rev/f05165839760
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•