-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create vmx_memchr() and use it (along with other JS string matching improvements) #406
Comments
Conceivably we could even vectorize it. Here is a fast |
|
This implies that for anything less than the size of stride (which I guess means at least one vector), a simple-minded routine is better. https://sourceware.org/viewvc/src/newlib/libc/string/memchr.c?revision=1.4&view=markup |
First pass, disabling |
VMX version currently around 3050, though the biggest improvement is on |
No others to convert that make sense. |
Add a SSE2 optimized variant of `memchr`. Results are mitigated on older Core 2 CPUs and more significant on newer ones. This uses code from <https://github.com/ridiculousfish/HexFiend/blob/184646d0a42a70b6a8015daeb510aca47714d863/framework/sources/HFFastMemchr.m> © 2005-2016 Peter Ammon, license: <https://github.com/ridiculousfish/HexFiend/blob/master/License.txt>.
A la https://bugzilla.mozilla.org/show_bug.cgi?id=1371215 :
We should be using the unrolled version, not
memchr()
, which is apparently gross and slow on anything before 10.12 (see https://gist.github.com/nico/2624336 ). In particular thedefined (__clang__)
is wrong, so we need to correct the block in https://hg.mozilla.org/mozilla-central/rev/f4048987a5e3Once that is done, we can take https://hg.mozilla.org/integration/mozilla-inbound/rev/fce84022f5e3 and https://hg.mozilla.org/integration/mozilla-inbound/rev/35b9efa24066 (minus the change above, of course).
The text was updated successfully, but these errors were encountered: