Closed mattgodbolt closed 1 year ago
The upcoming 2.0.0
release should not have this issue anymore. You can already play with the prerelease, but note that the API has changed since v1.4.4
.
The new 2.*
versions are performing better. Also, I now recommend to stack beartype
with nptyping
and to supress any type checking on production environments. Read more on this in the Quickstart section.
Closing this issue now.
In upgrading to 1.4.x we noticed a huge regression in performance checking
isinstance(x, NDArray)
. Before (v1.0.1), it took a microsecond or so, after 1.4.x we see it taking 20ms.We tracked most of this performance regression back to the call to
_get_type(instance)
which takes around 15-16ms.Is this something that can be fixed, or are we stuck with this for correctness' sake.
(c.f. 3aca957ea76f761e1c324a5493f59b9d38ac6143, cc @pitluga)