Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Dec 1995 19:40:41 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        nate@rocky.sri.MT.net (Nate Williams)
Cc:        terry@lambert.org, questions@FreeBSD.ORG
Subject:   Re: undump program
Message-ID:  <199512190240.TAA13367@phaeton.artisoft.com>
In-Reply-To: <199512190117.SAA25218@rocky.sri.MT.net> from "Nate Williams" at Dec 18, 95 06:17:43 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > It will not "compile" the perl program to a "binary".  It will make
> > a copy of the existing perl interpreter, and fill out some auto
> > data (including the default stack an PC).
> 
> Actually, since perl 'pre-compiles' code ahead of time, you will end up
> with the pre-compiled perl binary (in it's internal state), which is
> *much* faster to run since none of the error/syntax checking is done,
> plus you get the added benefit of not needing the perl binary on your
> distributed system.  (However, this is a moot point for any FreeBSD 2.X
> system which comes with perl pre-installed).

You mean that it does a token prepass and runs tokenized code instead
of text.  The syntax checking is in the token prepass.  This is a
textbook interpreter implementatrion.

It seems that what is missing is not an "undump", but a "bload/bsave"
mechanism.


> > There is no significant advantage to this approach over restructuring
> > your perl script based on splitting the precaclulation out to allow
> > you to execute it only once and hard-code the results in the perl
> > script.  The resulting "binary" will run at the same speed.
> 
> Wrong.

Wrong that "there is no advantage" or wrong that "the resulting 'binary'
will run at the same speed?

If the second case, then you should arrange to dump the perl interpreter
and the token image 10 or more times to get even more speed out of it.  8-).


> If I gave you an core/un-dumped perl program, you'd have almost as much
> (possibly more) difficulty in trying to re-create it as you would trying
> to re-create a C program from it's core image.

If I had sources to perl to determine the token values and memory
management, I could get the information out.

The point is, you'd have to be charging me more than I'm willing to pay
for a core dump for it to be worth my while.  Couldn't be any harder
than "uncompiling" Pascal code on a UCSD P system (like a Terak).


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512190240.TAA13367>