2 releases
Uses new Rust 2024
new 0.1.1 | Apr 27, 2025 |
---|---|
0.1.0 | Apr 24, 2025 |
#1159 in Algorithms
79 downloads per month
22KB
382 lines
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
lib.rs
:
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.
Dependencies
~1.5MB
~25K SLoC