Closed Bug 206338 Opened 21 years ago Closed 21 years ago

Improve txStack

Categories

(Core :: XSLT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sicking, Assigned: sicking)

Details

(Keywords: perf)

Attachments

(1 file)

txStack could be improved wrt speed. First of all we should mark all functions
as inline. Second we should not be calling non-inlined functions in nsVoidArray
when all they do is to call some other function, AppendElement is one example of
this. Third we should look into removing the empty-stack-safety-check in pop()
and peek(), and add it in the few places where the stack might be empty.
Attached patch Patch to fixSplinter Review
Turns out there was only one place where we called peek() without knowing that
the stack is non-empty.
Comment on attachment 123990 [details] [diff] [review]
Patch to fix

r=axel@pike.org. looks good to me. templatizing would be another patch, I
guess. Yac another "touch everything". :-(
Attachment #123990 - Flags: review+
Comment on attachment 123990 [details] [diff] [review]
Patch to fix

Please post some code bloat numbers before checking this in.
Attachment #123990 - Flags: superreview?(peterv) → superreview+
I didn't see any difference in compilesize with this. This probably means that
the difference is smaller then the alingments that occurs between different
blocks of code.
Status: NEW → ASSIGNED
checked in
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: