Bug 112202 - [iOS] Add optimized version of StringImpl's equal(LChar*,LChar*) for Apple CPUs
Summary: [iOS] Add optimized version of StringImpl's equal(LChar*,LChar*) for Apple CPUs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-03-12 15:38 PDT by Benjamin Poulain
Modified: 2013-03-13 13:46 PDT (History)
10 users (show)

See Also:


Attachments
Patch (2.83 KB, patch)
2013-03-12 15:42 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (4.25 KB, patch)
2013-03-12 17:06 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (4.31 KB, patch)
2013-03-13 00:18 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2013-03-12 15:38:40 PDT
[iOS] Add optimized version of StringImpl's equal(LChar*,LChar*) for Apple CPUs
Comment 1 Benjamin Poulain 2013-03-12 15:42:56 PDT
Created attachment 192827 [details]
Patch
Comment 2 Benjamin Poulain 2013-03-12 15:47:42 PDT
<rdar://problem/12437844>
Comment 3 Early Warning System Bot 2013-03-12 16:01:05 PDT
Comment on attachment 192827 [details]
Patch

Attachment 192827 [details] did not pass qt-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/17174180
Comment 4 Early Warning System Bot 2013-03-12 16:13:42 PDT
Comment on attachment 192827 [details]
Patch

Attachment 192827 [details] did not pass qt-wk2-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/17074383
Comment 5 WebKit Review Bot 2013-03-12 16:44:08 PDT
Comment on attachment 192827 [details]
Patch

Attachment 192827 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://webkit-commit-queue.appspot.com/results/17201136
Comment 6 Benjamin Poulain 2013-03-12 17:06:08 PDT
Created attachment 192836 [details]
Patch
Comment 7 Gavin Barraclough 2013-03-12 18:09:35 PDT
Comment on attachment 192836 [details]
Patch

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

Looks good!

> Source/WTF/wtf/text/StringImpl.h:933
> +        "b      66f\n"

I think you could invert this to:
-> "bneq 66f" "b 0b"

And if you then move the label "0:" down a line, you could branch past the cbz:
-> "bneq 66f" "cbnz 0b"

This would save an unconditional branch from the loop.
Don't know if this might help?
Comment 8 Peter Beverloo (cr-android ews) 2013-03-12 18:55:35 PDT
Comment on attachment 192836 [details]
Patch

Attachment 192836 [details] did not pass cr-android-ews (chromium-android):
Output: http://webkit-commit-queue.appspot.com/results/17188165
Comment 9 Benjamin Poulain 2013-03-12 19:27:40 PDT
> > Source/WTF/wtf/text/StringImpl.h:933
> > +        "b      66f\n"
> 
> I think you could invert this to:
> -> "bneq 66f" "b 0b"
> 
> And if you then move the label "0:" down a line, you could branch past the cbz:
> -> "bneq 66f" "cbnz 0b"
> 
> This would save an unconditional branch from the loop.
> Don't know if this might help?

Good idea! This is faster indeed.
Comment 10 Benjamin Poulain 2013-03-13 00:18:32 PDT
Created attachment 192876 [details]
Patch
Comment 11 Benjamin Poulain 2013-03-13 13:46:23 PDT
Committed r145748: <http://trac.webkit.org/changeset/145748>