On Wed, Aug 27, 2003 at 12:41:17PM +0100, Pigeon wrote: > To me, it seems that the obvious solution is to run the script through > a Perl compiler, and produce a binary executable that should execute > at the same order of speed as any other compiled HLL code. Why is this > not done? Is it simply that nobody's bothered to write a Perl > compiler, or is there some infelicity in the design of Perl that makes > it impractical?
People have done tricks like this to some degree, but the extent to which you can do things like messing about with the symbol table on the fly in Perl (and, in fact, this is how modules work) means that you have to have a Perl interpreter in the compiled binary anyway. Sure, you can gain a bit on initial parsing, but with anything but huge scripts which run for a very short time this is irrelevant. Perl 6 will include Parrot, a bytecode interpreter which will execute a compiled form of the language. It's rumoured to be much faster already, even with the language not fully designed. -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]