[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Questions about specification and possible implementations
- To: Charles Hedrick <HEDRICK@RUTGERS.ARPA>
- Subject: Questions about specification and possible implementations
- From: Skef Wholey <Wholey@CMU-CS-C.ARPA>
- Date: Thu, 04 Oct 1984 21:43:00 -0000
- Cc: COMMON-LISP%SU-AI@SU-SCORE.ARPA, Moon@SCRC-RIVERSIDE.ARPA, Rem%IMSSS@SU-SCORE.ARPA
- In-reply-to: Msg of 4 Oct 1984 16:24-EDT from Charles Hedrick <HEDRICK at RUTGERS.ARPA>
- Sender: WHOLEY@CMU-CS-C.ARPA
It is certainly alright to optimize BUILT-IN keyword functions, since "it is an
error" to redefine them; it is alright to "open code" CAR for the same reason.
If I were to put in code that tried to optimize ALL keyword functions, I would
transform your call
(foo :bogus-key 1)
into something like
(if (eq #'foo-intern-form '#<Function FOO-INTERNAL-FORM {75234}>)
(foo-internal-form 1)
(foo :bogus-key 1)),
where that quoted unreadable thing is what the caller thought FOO's
non-keywordized form was at the time of compilation. This is a correct
transformation even in the case that you're worried about, and can be done
efficiently on all machines I can think of. Those machines with hairy linkage
mechanisms could perhaps do it a wee bit more efficiently.
--Skef