Bug 115952

Summary: Improve stringProtoFuncLastIndexOf for the prefix case
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, cmarcelo, commit-queue, ggaren, joepeck, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch ggaren: review+

Description Benjamin Poulain 2013-05-10 22:42:15 PDT
Improve stringProtoFuncLastIndexOf for the prefix case
Comment 1 Benjamin Poulain 2013-05-10 22:47:31 PDT
Created attachment 201448 [details]
Patch
Comment 2 WebKit Commit Bot 2013-05-10 22:50:16 PDT
Attachment 201448 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/runtime/StringPrototype.cpp', u'Source/WTF/ChangeLog', u'Source/WTF/wtf/text/StringImpl.cpp', u'Source/WTF/wtf/text/StringImpl.h', u'Source/WTF/wtf/text/WTFString.h']" exit_code: 1
Source/WTF/wtf/text/StringImpl.h:704:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Build Bot 2013-05-10 23:27:51 PDT
Comment on attachment 201448 [details]
Patch

Attachment 201448 [details] did not pass win-ews (win):
Output: http://webkit-queues.appspot.com/results/297111
Comment 4 Benjamin Poulain 2013-05-11 00:56:08 PDT
Created attachment 201452 [details]
Patch
Comment 5 WebKit Commit Bot 2013-05-11 00:57:36 PDT
Attachment 201452 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def', u'Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in', u'Source/JavaScriptCore/runtime/StringPrototype.cpp', u'Source/WTF/ChangeLog', u'Source/WTF/wtf/text/StringImpl.cpp', u'Source/WTF/wtf/text/StringImpl.h', u'Source/WTF/wtf/text/WTFString.h']" exit_code: 1
Source/WTF/wtf/text/StringImpl.h:704:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 1 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Geoffrey Garen 2013-05-11 10:23:09 PDT
Comment on attachment 201452 [details]
Patch

r=me
Comment 7 Joseph Pecoraro 2013-05-11 13:38:47 PDT
Comment on attachment 201452 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=201452&action=review

Nice!

> Source/JavaScriptCore/ChangeLog:12
> +        On Joseph Pecoraro's tests, this gives a ~30% speed improvment.

Typo: "improvment" => "improvement"
Comment 8 Benjamin Poulain 2013-05-13 16:10:42 PDT
Committed r150042: <http://trac.webkit.org/changeset/150042>