Closed Bug 1033959 Opened 10 years ago Closed 10 years ago

Remove use of wmemchr

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: h4writer, Assigned: h4writer)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Even though wmemchr used to be an improvement, it looks like we have even better performance with the unrolledMatcher. Possibly by the changes made, the unrolledMatcher is now compiled even better (removal of a branch). So it even defeats memchr/wmemchr in windows.

For linux memchr is still faster. The memchr provided by linux is 10x faster than the windows variant.
Attached patch strmatch_speedSplinter Review
Use the unrolledmatcher for windows and osx (clang isn't the issue. It are the libraries provided on osx for memchr)
Assignee: nobody → hv1989
Attachment #8450038 - Flags: review?(luke)
On a testcase this gives an improvement from 400ms to 320ms
Blocks: 1028242
Comment on attachment 8450038 [details] [diff] [review]
strmatch_speed

Review of attachment 8450038 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsstr.cpp
@@ +1174,2 @@
>      /*
> +     * Performance under memchr is horrible in OSX. Windows is better,

I'd say "Performance of memchr is..."
Attachment #8450038 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/a9ffbd31b81c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: