Closed
Bug 517519
Opened 16 years ago
Closed 16 years ago
Several minor optimizations suggested by profiling
Categories
(Tamarin Graveyard :: Virtual Machine, enhancement)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: stejohns, Unassigned)
Details
Attachments
(2 files)
4.50 KB,
patch
|
edwsmith
:
review+
|
Details | Diff | Splinter Review |
2.05 KB,
patch
|
edwsmith
:
review+
|
Details | Diff | Splinter Review |
roll-up bug for a few minor optimizations suggested by VTune/Shark.
Reporter | ||
Comment 1•16 years ago
|
||
The vast majority of calls to findInterfaceAddr are from containsInterface, but that code path requires and extra load-and-test (unless the compiler is far smarter than is likely). Unrolling into addOneInterface/containsInterface drops the next Instructions Retired and Clockticks for containsInterface by ~50%, according to VTune. (ie, a tiny but positive gain.)
Attachment #401488 -
Flags: review?(edwsmith)
Reporter | ||
Comment 2•16 years ago
|
||
Dictionary::nextNameIndex can be fairly hot in some flex apps, and has a fairly-uncommon special case (weak keys) in its inner loop that can easily be hoisted. Along with some other trivial optimization, this drops Clockticks/IR by ~40% for typical testcases.
Attachment #401489 -
Flags: review?(edwsmith)
Comment 3•16 years ago
|
||
Comment on attachment 401488 [details] [diff] [review]
unroll findInterfaceAddr into callers
is it at all possible to do this inlining with REALLY_INLINE, perhaps? manually is okay given no alternatives but we're starting to do lots of it, i worry about maintenance getting more expensive.
Updated•16 years ago
|
Attachment #401489 -
Flags: review?(edwsmith) → review+
Reporter | ||
Comment 4•16 years ago
|
||
(In reply to comment #3)
> (From update of attachment 401488 [details] [diff] [review])
> is it at all possible to do this inlining with REALLY_INLINE, perhaps?
It possible, I guess -- there is one subtle difference between the two loops (order of checking) but it's pretty trivial performance-wise. I guess I'm a little shy about using REALLY_INLINE where unrolling looks like a maintainable alternative -- IIRC didn't Tommy/Lars recently have an issue where they had to go back to explicit code, because some compiler wasn't REALLY_INLINE-ing things?
Comment 5•16 years ago
|
||
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 401488 [details] [diff] [review] [details])
> > is it at all possible to do this inlining with REALLY_INLINE, perhaps?
>
> It possible, I guess -- there is one subtle difference between the two loops
> (order of checking) but it's pretty trivial performance-wise. I guess I'm a
> little shy about using REALLY_INLINE where unrolling looks like a maintainable
> alternative -- IIRC didn't Tommy/Lars recently have an issue where they had to
> go back to explicit code, because some compiler wasn't REALLY_INLINE-ing
> things?
I can't remember having problems with REALLY_INLINE; beyond that I have no opinion. I don't /trust/ the compiler with REALLY_INLINE, because not all compilers have it, but macros get unmaintainable very quickly.
Reporter | ||
Comment 6•16 years ago
|
||
well, to reiterate, it's certainly possible to encapsulate it with REALLY_INLINE, but we will end up re-introducing one of the outer tests that we eliminated.
Updated•16 years ago
|
Attachment #401488 -
Flags: review?(edwsmith) → review+
Reporter | ||
Comment 7•16 years ago
|
||
pushed as changeset: 2595:1d0a7298b2c6 and changeset: 2596:a702626ebbf3
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 8•16 years ago
|
||
Resolved fixed engineering / work item that has been pushed. Setting status to verified.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•