I wrote a blog post about slot access in Common Lisp:

https://turtleware.eu/posts/A-brief-note-about-slot-access-cost-in-Common-Lisp.html

Enjoy!

#lisp

TurtleWare

@jackdaniel Thanks for the insightful post.

I wonder if it would be possible to skip some of these checks or use mop:standard-instance-access or similar in some cases by JIT-compiling functions (which access CLOS instances) at runtime. I assume a decent portion of codebases could be faster with such an optimization technique in place. Maybe this idea overlaps with the fast generic function dispatch technique though.

@met fast generic dispatch will make readers faster, but not as fast as a direct memory access, so using instance access in jit makes sense. that said you can't use it on obsolete object, so you need to be careful to recompile when instance class changes and to ensure that the instance is updated to a new class.

@jackdaniel
I didn't know about STANDARD-INSTANCE-ACCESS

I guess I need to finally learn the MOP.