Re: Runtime optimizations
From: Matthew Danish (mdanish_at_andrew.cmu.edu)
Date: 03/02/04
- Next message: Pascal Bourguignon: "Re: Garbage Collection and Foreign Data"
- Previous message: Kenny Tilton: "Re: The staggering power of closures"
- In reply to: projectshave_at_yahoo.com: "Re: Runtime optimizations"
- Next in thread: Ingvar Mattsson: "Re: Runtime optimizations"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 2 Mar 2004 12:22:46 -0500
On Tue, Mar 02, 2004 at 08:56:19AM -0800, projectshave@yahoo.com wrote:
> Barry Margolin <barmar@alum.mit.edu> wrote in message news:<barmar-8381F0.16173101032004@comcast.ash.giganews.com>...
> > In article <20040301200359.GE31147@mapcar.org>,
> > Matthew Danish <mdanish@andrew.cmu.edu> wrote:
> >
> > > > If that's true, then does Allegro do any runtime optimizations? As a
> > > > dynamic language, a Lisp compiler could do a much better job if it did
> > > > type-aware specialization at runtime, if it had a better picture of
> > > > the type heirarchy, if it could propagate constants around, etc. Is
> > > > anything like this done in Allegro now?
> > >
> > > I sure hope so. I can't say much about Allegro, but CMUCL does
> > > intensive type-inferencing and makes use of the information to pick
> > > efficient representations and storage classes. It does copy
> > > propagation, constant folding, trace scheduling, register allocation,
> > > etc.
> >
> > I don't think it does this optimization dynamically at run time. It's
> > done based on static analysis of the code when it's first compiled.
First, yes, I misread his question.
> Thanks for the info. I also think these optimizations are done at
> compile-time, not run-time. If the compiler (cmucl or allegro) has a
> decent interface, one could call it dynamically. But this might still
> involve file I/O, which is slow relative to JIT compile time. If the
> compiler were separated nicely like FLINT (SML/NJ), one could do more
> with it.
Unlike SML which exists in a static world, the ANSI CL standard requires
an interface to the compiler which does not involve file I/O (unless
you're dealing with a compiler like GCL which uses GCC and temp files).
It's called COMPILE and it can be invoked at any time. In addition, I
am sure that you can fiddle with all sorts of fun compiler things at
run-time; I have done so in SBCL. One of the great parts about working
on most CL compilers is that you can dynamically modify many portions of
them directly from the top-level. Of course, if you screw up the
ability to compile a function, you may not be able to fix it without
restarting the lisp =)
I'm sure the SBCL and CMUCL people don't mind patches for interesting
optimizations, so long as they don't break other things.
-- ; Matthew Danish <mdanish@andrew.cmu.edu> ; OpenPGP public key: C24B6010 on keyring.debian.org ; Signed or encrypted mail welcome. ; "There is no dark side of the moon really; matter of fact, it's all dark."
- Next message: Pascal Bourguignon: "Re: Garbage Collection and Foreign Data"
- Previous message: Kenny Tilton: "Re: The staggering power of closures"
- In reply to: projectshave_at_yahoo.com: "Re: Runtime optimizations"
- Next in thread: Ingvar Mattsson: "Re: Runtime optimizations"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|