Pre-RFC: Pattern API v3.0

Sales pitch:

  • Support pattern API for &str, &mut str, &[T], &mut [T] and &OsStr, optionally Vec<T> and DoublyLinkedList<T>.

  • The new API allows trim_start(&str)'s speed to be improved up to 35×.

Draft:

Prototype:

6 Likes

Relevant: https://crates.io/crates/galil-seiferas

Thanks for the pointer. You mean we could fallback to galil-seiferas instead of naive search when T: PartialEq + !Ord?

Yeah, something like that might be a good idea.

(tho as always, constant factors may be more important for smaller inputs)

1 Like

Pushed as RFC 2500.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.