Closed
Bug 193804
Opened 22 years ago
Closed 20 years ago
eliminate use of function pointers in nsRuleNode
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
DUPLICATE
of bug 210550
People
(Reporter: dbaron, Assigned: dbaron)
Details
There are two places in nsRuleNode where we use function pointers but could probably use a switch statement or something similar. We originally started using function pointers because it was shown to be faster. However, a switch (perhaps in order by style struct ID, if the old one wasn't? -- which we'd automatically get by using nsStyleStructList.h) or some sort of hand-coded binary search might be faster. See bug 87229 for the previous work.
Assignee | ||
Comment 1•22 years ago
|
||
(sfraser suggested that the access to the global data, where the function pointers are, is particularly bad on Mach-O.)
Comment 2•22 years ago
|
||
Actually, my pageload tests showed that changing it from using a static table to using a switch had negligible impact on performance. A more isolated test would be needed to show up differences more accurately. There may be other areas in which frequent accesses of global data hurt performance on Mach-O: for instance, comparisons against the static layout atoms. Sampling a run of the pageload tests shows __cxa_get_globals as the most common function at the top of the stack (after functions that can context switch).
Assignee | ||
Comment 3•20 years ago
|
||
Hey, I filed the same bug twice. *** This bug has been marked as a duplicate of 210550 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•