Bug 83737 - Inline StringImpl::find(UChar, ...)
Summary: Inline StringImpl::find(UChar, ...)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-11 18:03 PDT by Benjamin Poulain
Modified: 2012-04-12 19:25 PDT (History)
2 users (show)

See Also:


Attachments
Patch (7.11 KB, patch)
2012-04-11 18:18 PDT, Benjamin Poulain
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2012-04-11 18:03:45 PDT
The overhead of having a function for StringImpl::find() is significant.
Comment 1 Benjamin Poulain 2012-04-11 18:18:08 PDT
Created attachment 136803 [details]
Patch
Comment 2 Geoffrey Garen 2012-04-12 14:19:05 PDT
Comment on attachment 136803 [details]
Patch

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

r=me

> Source/WTF/wtf/text/StringImpl.cpp:-780
> -size_t StringImpl::find(UChar c, unsigned start)

It looks like this code sometimes used "index" and sometimes used "start" for this argument name. FWIW, I slightly prefer "start" over "index", since it's more precise.

> Source/WTF/wtf/text/StringImpl.h:484
> +    inline size_t find(UChar character, unsigned index = 0);

No need for "inline" here.
Comment 3 Benjamin Poulain 2012-04-12 19:25:53 PDT
Committed r114071: <http://trac.webkit.org/changeset/114071>