DescriptionOptimize StylePropertySet::findPropertyIndex() to improve CSS properties performance
The Intel VTune Amplifier profiler pointed out the
'StylePropertySet::findPropertyIndex()' method as a
biggest hotspot when running CSS properties performance
tests.
The reason for the slowness was a significant amount
of unneeded work that this method was doing, e.g.:
- Checking whether 'PropertySet' is mutable on every
cycle iteration.
- Working with a proxy 'PropertyReference' object
instead of direct access to the 'PropertySet'
own data members.
The proposed optimization gives a significant performance
gain, for example the 'CSS/CSSPropertySetterGetter.html'
performance test shows the following.
Before the optimization applied:
avg 3860.903172938448 runs/s
median 3954.754079910417 runs/s
stdev 337.5965136262694 runs/s
min 3170.2197482668807 runs/s
max 4218.408078283424 runs/s
After the optimization applied:
avg 4522.43958295528 runs/s
median 4524.851984183224 runs/s
stdev 14.069412192849006 runs/s
min 4481.849781528119 runs/s
max 4545.219771571736 runs/s
Performance gain for the average value is approx. 17% (Linux desktop x64).
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167325
Patch Set 1 #
Messages
Total messages: 5 (0 generated)
|