[Top][All Lists]

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

GOOPS slowness [was: Compiling guile-gobject experiences]

From: Andreas Rottmann
Subject: GOOPS slowness [was: Compiling guile-gobject experiences]
Date: Mon, 15 Sep 2003 20:00:40 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

[Cc'ed to guile-devel since this is a guile/GOOPS speed issue;

 Context: The new guile-gobject Guile bindings for GTK+ use GOOPS to
 provide an OO interface. Building this interface (at binding module
 load time) is painfully slow (leading to a 10 seconds total for
 loading the whole GTK+ binding on my machine (Athlon 900)).

Andreas Rottmann <address@hidden> writes:

> A way to speed the binding creation up a little bit might be to move
> the ability to create methods into g-wrap, since that would save us a
> few scm_c_lookups for each method. I'll look into this once I'm done
> with testing the above mentioned modifications.
I've now done that and have all code for method creation in one
place. I did some simple benchmarking via clock() and identified the
major culprits:

  method creation : 4.35 seconds total (1350 * 0.00322222)
    GF create: 3.01 seconds total (782 * 0.0038491)
    method add: 1.25 seconds total (1048 * 0.00119275)

The values in the parenthesis are the count how often the code segment
is executed and the time in seconds for each iteration.

"GF create" is the following code:

default_val = scm_make (scm_list_3 (scm_class_generic,
                                    name_keyword, generic_name));

"method add" is this:

scm_add_method (gf, meth);

Now I wonder why it takes so long to construct a generic function (the
method add time is not *that* bad)...

Regards, Andy
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden | GnuPG Key:
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Packages should build-depend on what they should build-depend.

reply via email to

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