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: Binding local vars to avoid redundant function application?


karlheg@inetarena.com (Karl M. Hegbloom) writes:

> ;; ??? Would it be an optimization to write this:
> [...]
> ;; ... like this instead:
> [...] 
> ;; ... in order to avoid calling `symbol-pref' twice?

Yes, I think it should be faster.  `symbol-pref' is not a costly
operation, tho, as it is only an accessor to a field of the symbol
data structure.  A clever compiler could even compile it away.