Simplify & optimize StringImpl::replace(UChar, UChar)
StringImpl::replace(UChar, UChar) is mentioned as one of the hot spots by the Intel VTune Amplifier profile when running the 'textarea-dom.html' performance test. StringImpl::replace(UChar, UChar) is optimized (and simplified) by using 'StringImpl::find' method instead of manual traversing the internal buffer and checking 'is8Bit' property value on each iteration. This changes gives approx 2.25% improvement of the average 'textarea-dom.html' performance test results (linux desktop x64, GCC 4.6.3, release content_shell build with enabled 'linux_dump_symbols' flag). Review URL: https://codereview.chromium.org/304273003 git-svn-id: svn://svn.chromium.org/blink/trunk@175198 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment