tokuhirom's blog

Compiler::Lexer is awesome / Shipped Perl::MinimumVersion::Fast

goccy san released Compiler::Lexer. It is a lexical analyzer written in C++. It can analyze Perl5 code.

I write a Perl::MinimumVersion::Fast based on Compiler::Lexer. Perl::MinimumVersion is built on PPI, is not so fast. And PPI is a parser. It's over kill to detect required perl5 version.

Here is a benchmarking result of these two modules:

                            Rate Perl::MinimumVersion Perl::MinimumVersion::Fast
Perl::MinimumVersion       5.26/s                   --                       -97%
Perl::MinimumVersion::Fast  182/s                3365%                         --

Great! It's 33x faster!

(Note: Perl::MinimumVerrsion::Fast does not support perl 5.6)

And so, goccy san plan to release Compiler::Parser... I'm waiting it :P https://github.com/goccy/p5-Compiler-Parser

Created: 2013-05-22 07:17:14 UTC
Updated: 2013-05-22 07:17:14 UTC