Remove use of wmemchr

RESOLVED FIXED in mozilla33

Status

()

Core
JavaScript Engine: JIT
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: h4writer, Assigned: h4writer)

Tracking

(Blocks: 1 bug)

unspecified
mozilla33
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
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.
(Assignee)

Comment 1

4 years ago
Created attachment 8450038 [details] [diff] [review]
strmatch_speed

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)
(Assignee)

Comment 2

4 years ago
On a testcase this gives an improvement from 400ms to 320ms
(Assignee)

Updated

4 years ago
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
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.