guile-devel
[Top][All Lists]
Advanced

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

Re: [VM] Should `compile' always be visible?


From: Andy Wingo
Subject: Re: [VM] Should `compile' always be visible?
Date: Tue, 24 Feb 2009 00:11:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Hi,

On Fri 20 Feb 2009 01:45, address@hidden (Ludovic Courtès) writes:

> Do we really need it?  Guile `master' doesn't put any autoload in the
> global namespace, only in `guile-user-module', thus only affecting the
> REPL.

Yeah, dunno. It would be great to have `compile' in the toplevel
environment. OTOH it takes time. Here are the current numbers, to 2
significant figures:

  * guile -c 1 with compile as autoload:          10 ms
  * guile -c '(use-modules (ice-9 syncase)):      16 ms
  * guile -c 1, but loading the
    (system base compile) module unconditionally: 20 ms
  * guile -c '(compile 1)':                       55 ms

Note that there are various costs here. First there is syncase, which is
a fair amount of scheme code. Then there is all the "base" code of the
compiler tower, which includes syncase. Then in the last example, we
actually compile, which causes the languages from scheme to value to be
loaded: another cost. Probably the actual time spent compiling was low.

For comparison:

  * guile 1.8 -c 1:                               14 ms
  * guile 1.8 -c '(use-modules (ice-9 syncase))': 36 ms
  * python -c 1:                                  17 ms

This is all on my laptop running at full speed, an average over 10 runs.

I would like for the base language to include syncase. I think it's
worth paying 6 ms. But I would keep compile as autoload, or explicitly
included, until other things speed up. Maybe a useful goal would be:
always be faster than Python, just because we can :-)

Cheers,

Andy
-- 
http://wingolog.org/




reply via email to

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