[Top][All Lists]

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

slowness in guile 1.8

From: Andy Wingo
Subject: slowness in guile 1.8
Date: Fri, 25 May 2007 18:33:23 +0200

Hello guile devs,

I am doing some profiling with guile-gnome and guile 1.8. It is
significantly slower than 1.6. One reason in guile-gnome is the thinking
behind e.g. this change from 2004:

2004-12-22  Marius Vollmer  <address@hidden>

        * boot-9.scm (module-make-local-var!): When creating a new
        variable, initialize it to the value of any imported variable with
        the given name.  This allows code like (define round round) to
        work as expected.

(There were previous changes when duplicate handlers were introduced in
2003 by Mikael.)

This scheme code gets called whenever a variable is defined. The fact
that guile goes through module-variable and module binders, etc etc, to
compute what a value would have been *and then we throw it away*, is
quite wasteful. I'm attaching a statprof log from loading (gnome gtk);
out of 6.2 seconds loading the module (!), fully 3.8 of them were inside
module-variable. Of course profiling interpretation is not that simple,
but I think the trace shows a significant regression from 1.6, where I
was able to get (gnome gtk) loading down to less than 2 seconds, which
is still too much.

In this particular case the solution would be to compute the value
before computing the variable in which to store it. Computing the
variable in which to store is then O(1) in the number of modules in the
system, as it doesn't have to search the use list.

Any thoughts on this? Sometimes I think I'm just ranting to an empty
room ;)



Attachment: gnome-gtk-statprof
Description: Text document

reply via email to

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