Crate fastxfix

Source
Expand description

§FastXFix

Have you ever wanted to find the longest common prefix/suffix of a collection of String values (or any other comparable data type) at ridiculous speed? Well now you can :D

Use CommonStr when you expect the LCP/LCS to be a String, and use CommonRaw when you expect it to be Vec<T>.

Do not use CommonRaw when you just want the underlying bytes of an LCP/LCS of a String. CommonStr is specifically optimized for strings, and should always outperform CommonRaw, even when the underlying data is pure ASCII.

*_len methods are provided for when you expect the LCP/LCS to be particularly long and don’t want to allocate for it.

Traits§

CommonRaw
Trait for finding the longest common raw prefix/suffix of any 2D type.
CommonStr
Trait for finding the longest common String prefix/suffix of any 2D type.