From: Wally Mann
Subject: CLOS Speed Hack Question
Date: 
Message-ID: <2lok1o$sec@Times.Stanford.EDU>
Hi,
This is bound to be a naive question, but I have to ask ...

I'm running a March '92 version of PCL and am creating large structures
with lots of instances and lots of slot accessing ... and it runs very
slow.  In looking at the function slot-value  ...  first it tests for
a particular class, then uses a loop to find the slot definition from
the class, then "checks the validity of the wrapper", then it gets
an array index from the slot description, assuming there's an index
(which I assume means :instance allocation) it finally gets around
to accessing the array and checking for unbound slot.

If I never use :class allocation, why can't I put a hash table in
my class that will take me directly from SLOT-NAME to array index?
AND can I define accessor functions that directly use the index?

I know there's a lot of mystery code for optimization and maybe 
the code I'm looking at, "(defun slot-value ......)", isn't the
code that is actually running, but I wanted to check.

OH ... I'm running this on a Symbolics 3600 (no kidding).  I'm not
sure, but I think I tried loading the next more recent version of
PCL and it didn't compile (Sept, or something like that).

Many Thanks,
Wally Mann
ยทยทยท@freedom.stanford.edu