BurntSushi / memchr

Optimized string search routines for Rust.
The Unlicense
873 stars 99 forks source link

revert fallback memchr optimization #153

Closed BurntSushi closed 3 months ago

BurntSushi commented 3 months ago

It turns out that #151 broke big endian targets and CI didn't catch it because of a misconfiguration. (Namely, cross wasn't being used to run tests even when it was being used to do builds.)

I spent about 15 minutes trying to fix this myself, but it quickly became clear I'd need to spend more time writing out the bit arithmetic to get it right.

cc @stepancheg - I'd be happy to take a new PR that fixes the optimization for big endian targets.

Fixes #152

BurntSushi commented 3 months ago

It looks like the buggy CI configuration was introduced here (which is also when I introduced the s390x and powerpc64 targets): https://github.com/BurntSushi/memchr/pull/129

I'm pretty sure I was running the big endian tests locally as part of working on #129, which is why we never had any surprising test failures.

BurntSushi commented 3 months ago

This PR is on crates.io in memchr 2.7.4.

stepancheg commented 3 months ago

Resubmitted as #154.