unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* GOOPS slowness [was: Compiling guile-gobject experiences]
       [not found]     ` <87fziz5exr.fsf@alice.rotty.yi.org>
@ 2003-09-15 18:00       ` Andreas Rottmann
  0 siblings, 0 replies; only message in thread
From: Andreas Rottmann @ 2003-09-15 18:00 UTC (permalink / raw)
  Cc: guile-devel

[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 <a.rottmann@gmx.at> 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         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-15 18:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87ptjornbn.fsf@alice.rotty.yi.org>
     [not found] ` <20030804162116.GA1217@lark>
     [not found]   ` <871xulk3v7.fsf@zip.com.au>
     [not found]     ` <87fziz5exr.fsf@alice.rotty.yi.org>
2003-09-15 18:00       ` GOOPS slowness [was: Compiling guile-gobject experiences] Andreas Rottmann

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).