<div dir="ltr">I&#39;m working on a Cython-based library where I need to check the type/class of objects very, very often. Depending on the data that is fed in and the calls the developer makes I may have to do hundreds of thousands of checks. Because of that any significant difference between PyObject_IsInstance and PyObject_TypeCheck is important. <br>
<br>Via grep I found that typecheck seems to be disabled in Cython. I couldn&#39;t find any documentation on why that is. That brings up three questions:<br><br>1) Is there a significant speed difference? &quot;Significant difference&quot; for me is anything above 20%<br>
<br>2) If there is a speed difference how do I use PyObject_TypeCheck? It was never quite clear to me from the documentation that I could find.<br><br>3) Why was typecheck removed/disabled?<br><br><br>-Aaron DeVore<br></div>