Allow changing a DFA
's prefilter after it's already been created
#1225
Labels
DFA
's prefilter after it's already been created
#1225
I already added it to my fork but I guess I'd rather discuss it before submitting a PR.
In my use case prefilters are simple and speed up a search by an order of magnitude, but I'm serializing and deserializing DFA's with
::from_bytes
, which doesn't preserve prefilters. For this reason I save the prefilter separately and need this function to readd it when deserializing, after the DFA has been built with::from_bytes
.If changing a DFA at all after it's been built is really undesirable (is it?), another alternative would be to have
::from_bytes_with_prefilter
function variants which would serve the same purpose and cover the only thing (as far as I know) that would otherwise be lost in DFA (de)serialization.The text was updated successfully, but these errors were encountered: