Why is PikeVM the slowest engine? #1121
-
| In the docs it says the PikeVM regex engine "tends to be a tool of last resort because it is also usually the slowest regex engine". I feel like executing bytecode should be faster than dealing with the big graph data structures associated with the other DFA-based approaches Can anyone offer any insight on why this is the case? | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
| I think I answered this on HackerNews: 
 I also very briefly touch on this in my blog post on regex internals: 
 You can even see this in the code itself. For example, this bit is executed for every byte in a haystack: regex/regex-automata/src/nfa/thompson/pikevm.rs Lines 1457 to 1490 in 837fd85 Compare that with a DFA, where the number of instructions executed per byte of haystack is constant and very small: regex/regex-automata/src/dfa/search.rs Lines 97 to 124 in 837fd85 | 
Beta Was this translation helpful? Give feedback.
I think I answered this on HackerNews: