This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
[PATCH] Re: startup speed (or lack thereof)
- To: guile at sourceware dot cygnus dot com
- Subject: [PATCH] Re: startup speed (or lack thereof)
- From: "C. Ray C." <crayc at tomcramer dot org>
- Date: Thu, 16 Mar 2000 18:35:00 -0600
- References: <20000316174525.A22146@206.31.63.15>
On Thu, Mar 16, 2000 at 05:45:25PM -0600, C. Ray C. wrote:
> To figure out where all the startup time is going, I compiled with
> profiling enabled (CFLAGS="-O2 -pg" ./configure --disable-shared) and
> ran guile -c '(quit)'. Here are some of the results:
>
> % cumulative self self total
> time seconds seconds calls us/call us/call name
> 20.00 0.08 0.08 116854 0.68 0.68 scm_getc
[deleted]
> What this shows is that 30% of the startup time is taken by scm_getc() and
> scm_ungetc(). The interesting thing is, if you do an strace of guile -c
Just trying some stupid tuning on scm_getc(), and with this patch, the
scm_getc() time drops to 0.17 us, dropping the % time taken to 5.71 (!)
Index: libguile/ports.c
===================================================================
RCS file: /cvs/guile/guile/guile-core/libguile/ports.c,v
retrieving revision 1.99
diff -u -r1.99 ports.c
--- ports.c 2000/03/13 22:21:21 1.99
+++ ports.c 2000/03/17 00:25:45
@@ -824,6 +824,7 @@
c = *(pt->read_pos++);
+#if 0
if (c == '\n')
{
SCM_INCLINE (port);
@@ -836,6 +837,7 @@
{
SCM_INCCOL (port);
}
+#endif
return c;
}