Pre-RFC: Pattern API v3.0

#1

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

#2

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

0 Likes

#3

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

0 Likes

#4

Yeah, something like that might be a good idea.

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

1 Like

#5

Pushed as RFC 2500.

1 Like

closed #6

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

0 Likes