I'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.

Via grep I found that typecheck seems to be disabled in Cython. I couldn't
find any documentation on why that is. That brings up three questions:

1) Is there a significant speed difference? "Significant difference" for me
is anything above 20%

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.

3) Why was typecheck removed/disabled?


-Aaron DeVore
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to