guile-devel
[Top][All Lists]
Advanced

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

Re: What's the current recommendation for speeding up bits of guile code


From: Keisuke Nishida
Subject: Re: What's the current recommendation for speeding up bits of guile code.
Date: Tue, 20 Mar 2001 12:40:55 -0500
User-agent: Wanderlust/2.4.0 (Rio) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.0.99 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

At 20 Mar 2001 00:33:25 +0100,
Marius Vollmer wrote:
> 
> I think some sort of hybrid approach might be best, where we have a
> compiler that generates some very simple intermediate form (like a
> variant of Scheme with stack allocation and explicit heap consing of
> environment frames where this is necessary, and no non-toplevel
> closures, say).  We could then generate byte codes from that, or
> compile it to machine code using Lightning.

That's more or less what I do now, which I call GCIA:

 (lambda (n) (+ n 4)) -> (@asm (n) (local-ref n) (const 4) (add) (return))

I actually generate bytecode from this intermediate form.
It is certainly possible to generate machine code from this.

> I have some working bindings to Lightning for Guile, that I want to
> check in in the next days.  You can't really do anything advanced with
> it, but it's a start.  For example, I can do this:
> 
>     (use-modules (lightning))
> 
>     (define c (assemble '((leaf 1)
>                           (arg n)
>                           (getarg r0 n)
>                           (add ret r0 4)
>                           (ret))))

Wow, wow, wow, this is great!  We should probably work together.
I'll write more comments on this later on.

Kei



reply via email to

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