[pro] When to use SLOT-VALUE...

Andreas Fuchs asf at boinkor.net
Tue Nov 16 22:11:03 UTC 2010


On Tue, Nov 16, 2010 at 13:15, Nikodemus Siivola
<nikodemus at random-state.net> wrote:
> Of course, readability and maintainability trump efficiency any time,
> as long as the code if efficient enough for its intended purpose.

I'm not sure that it's entirely right to say slot-value will
definitely be faster. It may be faster in the cases you mention on
SBCL, but in one of our Allegro CL-based products, we just saw a 5-6%
improvement in performance on very common operations when we switched
from using slot-value to accessors (I think, almost exclusively).

That the change that made stuff faster also made it more readable
makes me very happy.

-- 
Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs




More information about the pro mailing list