-
benjamin@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=83738 Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-04-12 Reviewed by Geoffrey Garen. This patch improves replaceUsingStringSearch() with the following: -Add a special case for single character search, taking advantage of the faster WTF::find(). -Inline replaceUsingStringSearch(). -Use StringImpl::create() instead of UString::substringSharingImpl() since we know we are in the bounds by definition. This gives less than 1% improvement for the multicharacter replace. The single character search show about 9% improvement. * runtime/StringPrototype.cpp: (JSC::replaceUsingStringSearch): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
b1f2cdae