This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: slimming down boot-9.scm


"merry::satchell"@hermes.dra.hmg.gb writes:

> Transcend.scm is the sort of file that hobbit can compile; the c code looks
> reasonable to me, although I am not sure I could tell. 
> Why not just cut and paste it into numbers.c, you will then get full
> support for complex's with negiligble (sp??) boot time.

The problem with this is that it makes little sense to go the route
that transcend (or complex) uses (defining foo in terms of $foo) if
we're going to directly support complex numbers in the c code. We just
end up creating a bunch of useless functions prefixed by $.

negligible :)

> Another chunk of boot-9 that can easily be frozen in c is the polymorphic 
> posix definitions; even I can translate those by hand into c. They could then 
> go into the posix init function.

Yep, I'd think the only thing currently stopping it is the fact that
it's such an amazingly dull thing to do (maybe the biggest problem
with guile is so many of the problems are inherently unsexy). The only
drawback might be difficulties with the new module system, but if
you've been holding your breath for the new module system, you're
probably dead by now.

> Finally, I have played round with what I call quick-load. This reads 
> the whole file into a buffer, then evals that; it uses marginally more
> memory but is typically 20 or 30% faster in the cases I have used it. 
> The extra memory is freed when the file is loaded. I find it hard to imagine 
> that this will ever be a problem.
> 
> For code that is loaded before the module system is started, it should be 
> an even greater gain. quick-load uses the system level functions 
> (stat, open, read). It will not work on a pipe; in that case you probably
> have to fall back on the existing load. Is it worth hacking guile to try
> using quick-load as a default replacement for primitive-load?

Dunno if it's worth it or not, but I think it'd be cool :)

-- 
Greg