-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Milestone
Description
Fused function dispatch currently generates a lot of generic code. In most cases, however, the number of distinct fused types in a function signature will be 1 or 2, so a short if-cascade would likely produce less code and be much faster.
The dispatch code is generated in make_fused_cpdef() in FusedNode.py. It generates Cython code. This could be optimised for the common case of a few (positional) arguments by dispatching directly based on the argument types, instead of comparing full signatures in a loop at runtime.
Migrated from http://trac.cython.org/ticket/829