Open ashvardanian opened 7 months ago
Assuming search and split operations are lazy by default on native strings, I’m wondering if there is a way to avoid reimplementing those operations and still benefit from SZ speeds.
Would you be interested in me investigating this issue ? I can come up with a proposal as a draft PR too
Yes, @grouville, that can be very useful, thank you!
In C++ we have special smart iterators for bulk search and split operations. They lazily report the matches, avoiding heap allocations for the array of match offsets.
For that, an arbitrary matcher (string / character / character set ; in normal / reverse order) is combined with search / split ranges. Similar functionality should be added in Rust.