Newsgroups: comp.lang.clos
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!howland.reston.ans.net!news.sprintlink.net!in2.uu.net!harlequin.com!epcot!usenet
From: gray@meteor.harlequin.com (David N Gray)
Subject: Re: SLOT-VALUE/WITH-SLOTS vs. standard accessors?
In-Reply-To: pch@mystech.com's message of Wed, 30 Aug 1995 10:31:12 -0400
Message-ID: <GRAY.95Aug31113636@meteor.harlequin.com>
Lines: 15
Sender: usenet@harlequin.com (Usenet Maintainer)
Nntp-Posting-Host: meteor.menlo.harlequin.com
Organization: Harlequin, Inc., Menlo Park, CA
References: <pch-3008951031120001@198.3.157.39>
Date: Thu, 31 Aug 1995 18:36:36 GMT

In article <pch-3008951031120001@198.3.157.39> pch@mystech.com (Pete Halverson) writes:

> The other key issue, then, is efficiency, and here I'm somewhat less
> strong in my arguments.   Is SLOT-VALUE always faster than the equivalent
> accessor?  Is it *ever* faster?  When?
...
>  Can those who
> *are* familiar with the various CLOS implementations provide any info?

My (by now somewhat hazy) recollection of the implementation that I once
worked on (for the TI Explorer) is that SLOT-VALUE was more efficient when
used to access a specialized method argument, since in that case the
object's class is known at compile time.  Thus the recommended practice
there was to use SLOT-VALUE or WITH-SLOTS within the methods that implement
the class, and to use accessor functions for external access.
