http://qs1969.pair.com?node_id=59869

I was in the shower this morning and a thought struck me (anybody else observe similar occurrances of solutions coming to you in the shower?) about compiling Perl. What if the whole thing is being approached from the wrong angle? Previously the challenge has been to write another parser for the Perl language to accomplish the task of compilation. However, has it not been said that we shouldn't reinvent the wheel? There's already a perfectly good Perl parser out there--Perl! So what if the task of compilation is done by translating Perl's *bytecode* into machine code? Is this even a reasonable idea? I don't know much (read: anything) about Perl's bytecode (can anybody point me to some documentation?), but it seems to me that this could be somewhat easier than compiling the language.
~Cybercosis

Replies are listed 'Best First'.
Re: Yet Another Mental Stab At Compiled Perl
by merlyn (Sage) on Feb 21, 2001 at 18:59 UTC
    It's such a great idea that it has already gone back in time from your shower experience to say, five years ago when Malcolm Beattie first wrote the B module.

    it's a work in progress. Many people are already working on the solution exactly as you say it, and it's not trivial.

    -- Randal L. Schwartz, Perl hacker