I have been working on the Perl parser for several years, although since it was always pre-alpha, I never worried about speeding it up. However, I began to work on how to optimize it, and was surprised at what I found.
After some algorithmic and regular optimizations, normal execution takes about 3.5 seconds, of which about 2.3 is the time it takes to start Perl (which I measured with "time perl scriptname.pl" after installing "die (" Done ")," on the first line. "I understand that Regexp :: Grammars is not the fastest Perl module, but it seems that it takes much longer to initialize it than executing the script.
So I started learning a simple way to compile it to bytecode before running it. It seems B :: Bytecode, the only functional way to do this, is no longer supported or included in the main Perl distribution. Is there an easy way to reduce startup time?
Thanks!
source
share