Bug 45589 - Inline UTF8SequenceLength
Summary: Inline UTF8SequenceLength
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-11 08:52 PDT by Patrick R. Gansterer
Modified: 2010-09-22 10:57 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.03 KB, patch)
2010-09-11 08:57 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff
Patch (2.06 KB, patch)
2010-09-18 01:28 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff
Changes used for testing (957 bytes, patch)
2010-09-22 07:49 PDT, Patrick R. Gansterer
paroga: commit-queue-
Details | Formatted Diff | Diff
Patch (1.16 KB, patch)
2010-09-22 09:14 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick R. Gansterer 2010-09-11 08:52:12 PDT
see patch
Comment 1 Patrick R. Gansterer 2010-09-11 08:57:42 PDT
Created attachment 67299 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-09-14 23:53:48 PDT
Comment on attachment 67299 [details]
Patch

Please update your ChangeLog to explain "why".
Comment 3 Patrick R. Gansterer 2010-09-15 03:30:30 PDT
(In reply to comment #2)
> (From update of attachment 67299 [details])
> Please update your ChangeLog to explain "why".
Doesn't "inline" already explain it all?
Comment 4 Patrick R. Gansterer 2010-09-17 15:25:58 PDT
Comment on attachment 67299 [details]
Patch

(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 67299 [details] [details])
> > Please update your ChangeLog to explain "why".
> Doesn't "inline" already explain it all?
There is no real "why". It's only a cleanup.
Comment 5 Darin Adler 2010-09-17 17:04:48 PDT
Does it make the code faster? Smaller? Easier to read?
Comment 6 Patrick R. Gansterer 2010-09-18 01:28:32 PDT
Created attachment 68003 [details]
Patch

Added a "to improve performance" in the ChangeLog.
Comment 7 Darin Adler 2010-09-18 16:17:29 PDT
Comment on attachment 68003 [details]
Patch

OK. So does this improve performance?
Comment 8 Patrick R. Gansterer 2010-09-22 07:49:34 PDT
Created attachment 68371 [details]
Changes used for testing

> OK. So does this improve performance?
I've done a quick performance test with this patch.
I've got ~8% speed improvement on WinCE (time dropped from 2385 to 2203).
Comment 9 Darin Adler 2010-09-22 08:18:00 PDT
(In reply to comment #8)
> I've done a quick performance test with this patch.
> I've got ~8% speed improvement on WinCE (time dropped from 2385 to 2203).

Sorry to keep pushing on this, but did you try just calling the inline version as-is rather than merging them? I’d expect an even-better speed improvement if you just changed the call site in convertUTF8ToUTF16 and didn’t make the other changes.
Comment 10 Patrick R. Gansterer 2010-09-22 09:14:11 PDT
Created attachment 68378 [details]
Patch

(In reply to comment #9)
> Sorry to keep pushing on this, but did you try just calling the inline version as-is rather than merging them? I’d expect an even-better speed improvement if you just changed the call site in convertUTF8ToUTF16 and didn’t make the other changes.
I don't know why, but you're right! It's faster with the newest patch.
Comment 11 Darin Adler 2010-09-22 09:45:33 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > Sorry to keep pushing on this, but did you try just calling the inline version as-is rather than merging them? I’d expect an even-better speed improvement if you just changed the call site in convertUTF8ToUTF16 and didn’t make the other changes.
> I don't know why, but you're right! It's faster with the newest patch.

I believe I wrote the original function, and I followed the principle of inlining the hot part of the code and keeping the less-hot part out of line. This often makes things faster than just inlining everything.

Seeing that your original patch reversed that decision, I asked you to measure. Thanks for the extra effort.
Comment 12 WebKit Commit Bot 2010-09-22 10:29:05 PDT
Comment on attachment 68378 [details]
Patch

Clearing flags on attachment: 68378

Committed r68055: <http://trac.webkit.org/changeset/68055>
Comment 13 WebKit Commit Bot 2010-09-22 10:29:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 WebKit Review Bot 2010-09-22 10:57:09 PDT
http://trac.webkit.org/changeset/68055 might have broken Qt Windows 32-bit Release
The following changes are on the blame list:
http://trac.webkit.org/changeset/68056
http://trac.webkit.org/changeset/68055