gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: Thanks for the help.


From: Camm Maguire
Subject: [Gcl-devel] Re: Thanks for the help.
Date: 17 Feb 2004 16:38:02 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

Eric <address@hidden> writes:

> Hi Camm,
> 
> Thank you for your message. I am in a tough spot
> because I'm trying to participate in an international
> programming competition, and my Lisp is too slow.
> Everyone else is using C. So, I thought I would try
> GCL and see if I can get 'em with that.
> 
> It looks like the only difference between what I'm
> doing and your example is that you're using
> (disassemble) to compile the form, and I'm using 
> (compile-file) to compile a sequence of forms.
> 

(disassemble ...) runs a mock (compile ..) on a defined function and
shows the C and assembler output.  It does not actually replace the
function with its compiled version.

> So, how do I use (disassemble) on a file containing
> many forms?
> 

I neglected to mention a facility you might find useful -- function
proclamations can be generated automatically.  You can see how this
works by looking at the makefile in the lsp subdirectory of the GCL
source tree.  In short, before compiling each file, (load
"....gcl_collectfn.o") (compiler::emit-fn t)(compile-file ....).  This
will make intermediary .fn files in the current directory.  When done,
then fire up gcl again, (load "....gcl_collectfn.o")
(compiler::make-all-prclaims "*.fn").  This will make
sys-proclaims.lisp, which you can then autoload when compiling your
source a second time by placing the following in gcl_cmpinit.lsp: (if
(probe-file "sys-proclaim.lisp")(load "sys-proclaim.lisp")).  Ideas on
making this easier are always appreciated.


> I will try to see how to use (disassemble) and I'll
> get back to you if it works or not.
> 

Please keep us posted.

Take care,

> Thanks a lot for the hint!
> 
> --Eric
> 
> --- Camm Maguire <address@hidden> wrote:
> > Greetings!  Please let me know if the previous post
> > does not clarify
> > this question.
> > 
> > Take care,
> > 
> > Eric <address@hidden> writes:
> > 
> > > Hello,
> > > 
> > > Can you please help me with a quick question?
> > > 
> > > I am able to compile my Lisp program with GCL,
> > however
> > > I don't realize any speed-up in runtime
> > performance.
> > > In fact, it runs slower than my original Lisp
> > program.
> > > 
> > > So, I added function prototypes and type
> > declarations
> > > for function parameters. I get the same result as
> > > before.
> > > 
> > > Is there some additional trick required in order
> > to
> > > get GCL to run as fast as CLISP?
> > > 
> > > --Eric
> 
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]