I'm curious whether it would be possible to generate a Python representation of the matcher data structure, and if so, whether that might be even faster at matching (e.g. fewer lookups as things would be hardcoded, more scope for Pypy to optimize?). Just tossing that out there as a potential idea, but in any case curious to know what you think.