Open
Bug 1396874
Opened 7 years ago
Updated 2 years ago
stylo: Investigate why PropertyDeclarationBlock::get is (can be?) slower than nsCSSCompressedDataBlock::ValueFor
Categories
(Core :: CSS Parsing and Computation, enhancement, P4)
Tracking
()
NEW
People
(Reporter: bzbarsky, Unassigned)
Details
Fundamentally these should be doing very similar things: walk an array of (property id, value) pairs and get the value. But in bug 1355599 we have:
>* 14 samples in nsCSSCompressedDataBlock::ValueFor vs 35 samples in PropertyDeclarationBlock::get
and it might be worthwhile to check why. What do the actual data representations end up looking like, for example? Are we doing extra branches or pointer-chases in PropertyDeclarationBlock::get?
For scale, I believe those numbers correspond to 1.4ns and 3.5ns per call respectively, so we're talking tiny numbers of instructions here. If it turns out that the difference is due to PropertyDeclarationBlock being optimized for some particular use that's hotter than get(), that would be enough reason to do nothing. But it seems like property lookup in a PropertyDeclarationBlock would be a pretty common operation on that data structure.
Reporter | ||
Comment 1•7 years ago
|
||
Oh, and priority wise this is definitely in the "post-ship optimization" bucket.
Updated•7 years ago
|
Priority: -- → P4
Updated•7 years ago
|
status-firefox57:
--- → wontfix
status-firefox58:
--- → fix-optional
Comment 2•7 years ago
|
||
status-firefox59:
--- → ?
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•