[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: RWK at MIT-MC
- From: George J. Carrette <GJC at MIT-MC>
- Date: Mon, 20 Jul 81 18:06:00 GMT
- Cc: BUG-LISP at MIT-MC
- Original-date: 20 July 1981 14:06-EDT
For your information I did try the EQ before I sent the bug note.
Your problem is that you go out of your way to find out why somebody
is wrong rather than finding out why they are right.
Furthermore, the problem is the optimization.
Lately people hacking maclisp have been spending so much time worrying
about open-coding type optimizations that they forget about CORRECTNESS.
They also forget about code compactness, which is incredibly important
in poor little maclisp. Generating code like
(SETQ |NumP..2| (MEMQ (TYPEP X) '(FIXNUM FLONUM)))
(COND ((AND (NOT |NumP..2|) (EQ X 'Y)) Z)))
for (selectq x (y z)) is pretty darn stupid when
(if (eq x 'y) z) is perfectly correct and a hell of a lot more compact.
[Also faster damn it.]
The main idea: Is to use EQ whenever possible, and to punt to EQUAL if
needed. The idea to use "=" because "=" is the correct thing for
comparing fixnums is (compiled) maclisp sounds nice, but doesn't pan
out. If you want a SELECTQ that produces correct and compact code,
and code which is faster than the present installed abortion,
then try GJC;SELECT >.