[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: email@example.com
- Subject: #, implementation
- From: firstname.lastname@example.org (Gail Zacharias)
- Date: 21 Jun 88 19:45:57 EDT (Tue)
- Cc: email@example.com
- In-reply-to: Sandra J Loosemore's message of Tue, 21 Jun 88 08:53:15 MDT <8806211453.AA15752@cs.utah.edu>
From: firstname.lastname@example.org (Sandra J Loosemore)
Date: Tue, 21 Jun 88 08:53:15 MDT
The question of efficiency of referencing a constant data structure
created with #, versus referencing a special variable has been raised.
Depending on the setting of optimization options, we might do boundp checks on
compiled special variable references. There is also the space inefficiency of
having to create a symbol (and a pname string, and a slot in a package, etc)
to hold a value which is only going to be referenced once.
Also, I'm curious to know: what does your reader return for #, and how
does the compiler recognize it when it's buried inside of a QUOTE form?
We return a list whose car is a unique gensym and whose cadr is the form.
When it occurs inside a quoted form, it ends up passing unnoticed through the
compiler to the fasldumper, which then handles it specially. In addition, the
gensym has a macro definition in an arguably pointless attempt to make
unquoted #,'s do something reasonable (or at least semantically correct)
whenever possible. We don't handle the special-form case -- as in "(LET
#,(MY-VARS) ...)" -- at all (i.e. don't even signal an error in most cases).