DescriptionOptimize MutableStylePropertySet::findPropertyIndex
The Intel Vtune Amplifier showed 'MutableStylePropertySet::findPropertyIndex' as one of the biggest hotspot by CPU usage viewpoint for CSS performance tests.
This patch makes it more efficient by using std::find_if instead of previously used linear search, the test results improved as following:
1) CSSPropertySetterGetterMethods.html - approx. 11% better
before
avg 8209.627773541746 runs/s
median 8219.159152799137 runs/s
stdev 95.69280121453318 runs/s
min 7950.488333886082 runs/s
max 8334.299157035108 runs/s
after
avg 9095.94802572367 runs/s
median 9098.099366883693 runs/s
stdev 60.291500266466144 runs/s
min 8946.226065032974 runs/s
max 9180.054245827989 runs/s
2) CSSPropertyUpdateValue.html - approx. 4% better
before:
avg 14598.817565565343 runs/s
median 14620.181782154228 runs/s
stdev 75.59180598169823 runs/s
min 14406.699115207599 runs/s
max 14688.987467305702 runs/s
after:
avg 15207.605281115579 runs/s
median 15217.061385777779 runs/s
stdev 190.52047714899481 runs/s
min 14810.510319831952 runs/s
max 15447.612680018468 runs/s
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196923
Patch Set 1 #Patch Set 2 : Fix debug build #Messages
Total messages: 12 (4 generated)
|