On 03/26/2012 09:10 PM, Dmitry Olshansky wrote:
Speaking more of run-time version of regex, it is essentially running a VM that executes instructions that do various kinds of match-this, match-that. The VM dispatch code is quite slow, the optimal _threaded_ code requires either doing it in _assembly_ or _computed_ goto in the language.
Language-enforced tail call optimization would probably work too.