Thanks Morton for checking my results.
Edson you could try another version with a case table instead of the call table.
Maybe casetables allow inlining.
Ordering your "if" cascades by statistical frequency may help to.
Some of your "if" cascades could likely be improved by a case table.
OK.
Probably this is not a fair comparison, because the prefix-algorithm is bad implemented. I just wanted to show to even in this way, the prefix algorithm could be faster. I'm sure that including just one more case table, it will be faster.
Edson your Perl HL produces a different amout of tokens than the one included in the newest Lazarus.
I'm comparing with the Perl Highlighter of Lazarus 1.0.12. I checked the tokens for a small sample, and it was the same.
Moreover, this prefix-highlighter is just for testing, no for production.
I'll try to do a better comparison.
PD. I haven't compared the Pascal Highlighter, because it has foldind implemented.