guile-devel
[Top][All Lists]
Advanced

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

Re: a plan for native compilation


From: Andy Wingo
Subject: Re: a plan for native compilation
Date: Sat, 17 Apr 2010 13:19:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Greets,

On Sat 17 Apr 2010 01:15, address@hidden (Ludovic Courtès) writes:

> Andy Wingo <address@hidden> writes:
>
>> So, my thought is to extend procedures with an additional pointer, a
>> pointer to a "native" code structure.
>
> (So your point is what should we do now to allow for such experiments
> eventually, right?)
>
> Adding an extra work to programs seems like a good idea, yes.

I'm not sure I have an immediate point ;) Also I don't think it's a good
idea to reserve a word "just-in-case". Better to do this work on a
future 2.2 branch. The word would probably go in the objcode structure,
also; a 5-word procedure object has bad cache implications.

>> Now, what technology to choose for the compiler itself? Dunno. For a
>> JIT, it would be useful to use something portable, and perhaps do the
>> JIT compilation on the bytecode itself, without more source information.
>> It would not produce the fastest code, but it would run fast.
>
> Yes, that’s what I had in mind, using GNU lightning (see
> <http://www.fdn.fr/~lcourtes/software/guile/jit.html>.)  It /seems/ to
> be doable, with milestones to do it incrementally, starting from a dumb
> version.

Yes, I had your model in mind. I think it's generally a good idea,
though I would like to be able to avoid trampolining.

>> I think we can produce better native code ahead-of-time coming from the
>> tree-il layer directly. I feel like eventually we'll need to replace
>> GLIL with something else, but I don't really know; we'll find out in the
>> future I guess. But I do want to do ahead-of-time compilation, because
>> I want Guile programs to start up very quickly and not consume much
>> memory.
>
> Sure.
>
> lightning does x86, x86_64, sparc, and powerpc (PLT uses it) while Sassy
> does only x86, so it may be that both could play a role.
>
> Anyway, not for now.  :-)

Agreed :) Just wanted to reify these thoughts, as breadcrumbs for the
future :)

Andy
-- 
http://wingolog.org/




reply via email to

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