From: ludovic.courtes@laas.fr (Ludovic Courtès)
Cc: Guile-Devel <guile-devel@gnu.org>
Subject: Re: Inlining calls to primitives
Date: Fri, 15 Sep 2006 13:57:58 +0200 [thread overview]
Message-ID: <87y7sluyt5.fsf@laas.fr> (raw)
In-Reply-To: <87hcz9v2vx.fsf@ossau.uklinux.net> (Neil Jerram's message of "Fri, 15 Sep 2006 11:29:54 +0100")
Hi Neil,
Neil Jerram <neil@ossau.uklinux.net> writes:
> - For the memoization of globals, I'd like to see what a patch looks
> like that contains only this. We would need some kind of
> declaration to say "memoize globals in the following code", and it
> feels obvious to me that this declaration should have lexical scope
> - in other words, the declaration affects the code that it looks
> like it affects. I think this means that we have to use a source
> property and mark expressions as they are read .... but I leave the
> details of this to you.
Yes, that's probably the best thing we can do, although it complicates a
bit the compilation/memoization phase (namely, instead of
`if (SCM_INLINE_MODE_P)', a more complex and potentially costly test
has to be performed).
> - To make sure that we don't lose your research, I suggest you create
> a new directory "performance" in the CVS "workbook" module (parallel
> to guile-core), and store your discussion results (per your emails)
> in a suitably-named file there.
Ok, I'll try to look at it (but beware: I'm a bit lazy).
> Finally, can I ask whether you are doing this work because you are
> trying to meet a specific performance target? If so, what is the
> target and how far away from it are you at the moment?
I do not have any specific performance target in fact: I'm just trying
to learn and play with Guile to see how it can be made faster. :-)
My main motivation is that Guile is very slow, and I believe that this
can significantly restrict the applications where people would consider
using it. By very slow, I mean compared to other interpreters, even
compared to sister implementations like SCM and... Guile 1.4. It's
also an order of magnitude slower that Bigloo's interpreter, for
instance. One can notice this by running simple programs like loops,
etc.
Initially, after spending some time playing with Guile's GC, I managed
to (wrongfully?) convince myself that the GC may be responsible for an
important part of Guile's relative slowness. Alas, my first experiments
with Boehm GC were not conclusive performance-wise (although this still
needs to be studied in more details).
The motivation for this inlining/memoization thing was that I believed
that calls to those small built-in procedures incurred significant
overhead (several C function calls to execute just a few instructions)
and could be quite easily avoided this way. At the same time, I thought
it would be nice to have this kind of optimization rather than rewrite
Scheme code in C.
Thanks for your analysis and advice. It's always pleasant to get
detailed feedback like this.
Ludovic.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2006-09-15 11:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-29 8:48 Inlining calls to primitives Ludovic Courtès
2006-09-04 22:02 ` Neil Jerram
2006-09-05 16:20 ` Ludovic Courtès
2006-09-15 10:29 ` Neil Jerram
2006-09-15 11:57 ` Ludovic Courtès [this message]
2006-09-05 16:21 ` Ludovic Courtès
2006-09-05 22:53 ` Kevin Ryde
2006-09-06 1:20 ` Rob Browning
2006-09-06 8:21 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y7sluyt5.fsf@laas.fr \
--to=ludovic.courtes@laas.fr \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).