guile-devel
[Top][All Lists]
Advanced

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

options.[ch]


From: Dirk Herrmann
Subject: options.[ch]
Date: Mon, 1 Oct 2001 20:33:20 +0200 (MEST)

Hello,

I have reorganized the implementation of the options.  These are the
changes:

* Formerly, the contents of a scm_t_option struct were modified:  The doc
string was converted from a char* into a scheme string, and the result was
stored at the same place as the char* had been stored before.  This lead
to a lot of strange casting operations and was not a very clean approach.
With my patch, the conversion is not done in advance, but instead every
time the doc string is requested.  The advantage is added cleanlyness and
less scheme objects being alive on average.  The disadvantage is a
performance degradation everytime option documentation is requested.  
Since I assume that options docs are not read very frequently, this seems
acceptable.

* Similarly, option names are not converted to symbols.  Instead, these
are temporarily converted whenever an option setting is read, or when
options are set.  Pros and contras are similar to the above point, except
that this also implies a performance degradation each time an option is
changed.

* The function scm_init_opts, which originally performed the modifications
of the struct values, has been removed.

Should I commit these changes, or does someone expect major negative
performance implications due to the changed performance of the option
functions? - Note that reading of option values is not effected if done
from the C level.

Best regards
Dirk Herrmann




reply via email to

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