Hi all,

A little update on LexPerl: I have made some changes to my copy of the LexPerl code to improve its performance without affecting lexing behaviour. Still experimenting.

Peformance of LexPerl with CPAN.pm (from perl5 library) for 1000 iterations of editor:Colourise(0, -1):
(Machine is an Athlon 2500+, using SciTE 1.64+ (Mingw))

-------------------------------------
                  | MB/sec  | Runtime
1.64 version      | 5.80    |  38s
CVS version       | 1.30    | 170s
Some optimization | 1.85    | 119s
Without Flush()*  | 5.51    |  40s
-------------------------------------
*lookback does not work correctly without Flush(), of course

It turns out styler.Flush() is quite expensive (about 2/3 of the lexer's running time), which is a bit of a downside to a lookback algorithm if it is done very frequently. I guess it's time to use a bit of state information.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to