Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!s3!gamin From: gamin@ireq-robot.hydro.qc.ca (Martin Boyer) Newsgroups: comp.lang.perl Subject: Re: PERL compiler ?!? Message-ID: <3893@s3.ireq.hydro.qc.ca> Date: 15 Nov 90 04:48:36 GMT References: <1990Nov13.100359.1846@squirrel.mh.nl> Sender: root@s3.ireq.hydro.qc.ca Organization: Laboratoire de robotique, Institut de recherche d'Hydro-Quebec Lines: 24 In article <1990Nov13.100359.1846@squirrel.mh.nl> Johan Vromans writes: > >In article mitch@hq.af.mil (Mitch Wright) writes: >> Has anyone ever considered writing a PERL compiler? > >With regard to the nature of PERL: the generated binary would need to >include the whole PERL compiler itself. Not sure; think for instance about the way Lucid can reduce LISP image sizes with a technique they call "tree shaking". The way I understand it, you start with the top-level function, recursively find all the functions it invokes and disregard the remaining functions. Provided the PERL script (or the LISP program) doesn't call eval (which was mentioned earlier in this thread), you will end up with a smaller binary than the sum of PERL and the original script. Doing this, of course, requires extensive knowledge of PERL internals; who knows what 'print', for instance, calls internally. -- Martin Boyer mboyer@ireq-robot.hydro.qc.ca Institut de recherche d'Hydro-Quebec mboyer@ireq-robot.uucp Varennes, QC, Canada J3X 1S1 +1 514 652-8136