Playground
Any pattern, any inputs, nothing graded. The step count is the same one every task is scored on, so a pattern that looks expensive here is expensive everywhere.
//
Corpus
Steps12/ 10,000| Input | Match | Steps |
|---|---|---|
| (empty) | 3 | |
| (empty) | 3 | |
| (empty) | 3 | |
| (empty) | 3 |
Select an input to step through what the engine did to it.
Trace
Pick an input from the corpus and every step the engine takes on it appears here, forwards and backwards.
Inputs
One input per line. A blank line is an empty string, which is a real input and often the interesting one.
Both engines
| Input | Backtracker | Automaton | ||
|---|---|---|---|---|
| Result | Steps | Result | Steps | |
| [email protected] | match | 3 | match | 1 |
| o'[email protected] | match | 3 | match | 1 |
| not an address | match | 3 | match | 1 |
| [email protected] | match | 3 | match | 1 |
The two step counts are not the same unit — one counts instructions dispatched, the other states examined. What is comparable is how each one grows: add characters to the input and watch which column moves. The automaton has no captures, which is what it gave up to get there.