DescriptionSpeed up case folding for 8-bit strings
From http://trac.webkit.org/changeset/160954 by Anders Carlsson <andersca@apple.com>
"Add a case folding lookup table for 8-bit strings and use it instead of calling down to u_foldCase.
On a simple microbenchmark using a lookup table is about 15x faster."
The Intel Vtune Amplifier profiler showed 'ucase_fold()' calls among the top hotspots by CPU usage when profile the 'modify-element-classname.html' performance test and these calls were from 'WTF::equalIgnoringCase(const LChar* a, const LChar* b, unsigned length)'.
This patch optimizes 'WTF::equalIgnoringCase()' so that the test's median time value falls approximately by 12% and the profiler shows the following delta of the total CPU time for the whole test execution: 3.550s - 3.145s = 0.405s
Considering that 'WTF::equalIgnoringCase()' is a generic function and it is used very intensively in many places we can anticipate significant performance improvements for other scenarios as well.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196478
Patch Set 1 #Patch Set 2 : Added a unit test #
Messages
Total messages: 9 (3 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||