develooper Front page | perl.perl5.porters | Postings from July 2009

Re: Perl B::Bytecode

Thread Previous
Reini Urban
July 27, 2009 00:48
Re: Perl B::Bytecode
Message ID:
2009/5/13 Rafael Garcia-Suarez <>:
> 2009/5/13 Reini Urban <>:
>> 2009/5/13 Konstantin Kuzvesov <>:
>>>  Is there a way to convert to bytecode not a whole file but a single block like eval does?
>>>  And to load a bytecode from a variable?
>>>  I've got a number of scripts that format web pages and these scripts are expected to be modified very infrequently.
>>>  The scripts are stored in a database. I want to load a script from database to a variable, make a bytecode from that
>>>  source (or precompile it in any other way), store precompiled code back to database, and then run it.
>>>  Now I can run loaded script using eval but Perl compiles it every time.
> The perl parser is likely to be faster than the bytecode parser.
> And it's also immensely more robust.

Excuse me?
The bytecode parser is immensely faster than the sourcecode parser.
This is the whole deal about bytecode plc's, that the parsing step is skipped.

Robustness: Sure.
The perl parser is maintained by p5p, the bytecode modules by me and
are heavily dependent on internal changes on p5p, which they decided
not to support in the B compiler anymore.
Some new struct changes are still not supported properly in B::Bytecode.

Also B::Generate is broken by p5p several times on purpose.
Reini Urban

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About