tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

louise_rt_prims: a SWAR substring-search kernel (`find`)

memchr's "generic SIMD" substring search as SWAR over a u64: no nightly
features, no architecture intrinsics, so every target and both backends
run the one kernel (the interpreter is the native backend's oracle).

Dispatch by needle length (memchr's law: no single substring algorithm
wins everywhere):

- 0 bytes: Some(0)
- 1 byte: SWAR memchr, four words (32 bytes) a step
- 2-4 bytes: first/last-byte pair filter, one word a step, survivors
  confirmed whole
- 5+ bytes: the same pair filter, two words (16 bytes) a step

The pair filter ANDs a word of candidate first bytes with a word of
last bytes len-1 ahead; survivors are rare and confirmed with a slice
compare. Not wired up yet; issue #380.

olivier · il y a 3 sem. · 6fe5209dd2f0daa588df7c66cea8307e6701963f

Parents 19bc044

1 fichiers modifiés, 241 ajouts, 0 suppressions

Mruntime/louise_rt_prims/src/lib.rs+241−0