RESOLVED FIXED 83961
Generalize the single character optimization of r114072
https://bugs.webkit.org/show_bug.cgi?id=83961
Summary Generalize the single character optimization of r114072
Benjamin Poulain
Reported 2012-04-13 16:58:44 PDT
Some more testing shows: -After r114071, the specialization/inline of r114072 gives little performance improvement -The biggest gain is actually because we avoid a memory allocation. This should be generalized in WTF I should move the improvement of r114072 over to WTF. + Do not go over the string when searching for a UChar > 0xff in a string of LChar
Attachments
Patch (8.13 KB, patch)
2012-04-13 17:08 PDT, Benjamin Poulain
eric: review+
eric: commit-queue-
Benjamin Poulain
Comment 1 2012-04-13 17:08:38 PDT
Benjamin Poulain
Comment 2 2012-04-13 17:14:11 PDT
This introduce a tiny regression (< 1%) for replaceUsingStringSearch() with 1 character string but we do not regress to levels prior to r114072. On the plus side, this improves stringProtoFuncIndexOf() in similar ways to what was done for replaceUsingStringSearch(). I have an idea for another improvement for replaceUsingStringSearch(). If needed, I'll make a generalized inline version for replaceUsingStringSearch() and stringProtoFuncIndexOf().
Eric Seidel (no email)
Comment 3 2012-04-19 15:57:31 PDT
Comment on attachment 137182 [details] Patch This seems reasonable. Could you add performance/testing information to your ChangeLog? That would make this an easy r+.
Eric Seidel (no email)
Comment 4 2012-04-19 15:58:18 PDT
Comment on attachment 137182 [details] Patch I guess you have some perf information in the comments of the bug. They would be much better in the ChangeLog.
Benjamin Poulain
Comment 5 2012-04-24 16:41:46 PDT
Note You need to log in before you can comment on or make changes to this bug.