Are you sure the performance gains are from the low-level code, and not from refactoring the grammar to backtrack less?