When an object has __slots__, attributes are populated ahead of time with a special descriptor object. For example:
>>> import inspect
>>> class Test:
... __slots__ = ('x',)
...
>>> inspect.getattr_static(Test(), 'x')
<member 'x' of 'Test' objects>
When actually looking up the attribute, Python then has to invoke __get__, which in this case means formatting and constructing an AttributeError object, which the other paths don’t have to do (because they have fast paths that know when they’re being used under hasattr), thus causing the apparent slowdown.
I suppose we can optimize this by adding a special case in _PyObject_GenericGetAttrWithDict that avoids invoking tp_descr_get when looking up an exact PyMemberDescr_Type instance. Please file an issue for this on our issue tracker.