[pypy-dev] Cython-CEP: Native dispatch through Python callables

Stefan Behnel stefan_ml at behnel.de
Sat Apr 14 09:47:54 CEST 2012


Stefan Behnel, 14.04.2012 09:36:
> wlavrijsen at lbl.gov, 13.04.2012 22:19:
>> Same goes for C++ overloads (with a little care): each overload that fails
>> should result in a (python) exception during mapping of the arguments. The
>> JIT then removes those branches from the trace, leaving only the call that
>> succeeded in the optimized trace. Thus, any time spent making the selection
>> of the overload efficient is mostly wasted, as that code gets completely
>> removed.
> 
> A static compiler would handle that similarly.

Ah, sorry, misread your paragraph. You were talking about alternative
signatures. Yes, those require at least some setup overhead in static code.
Should be possible to avoid that overhead in loops, though. We'll see how
that works out.

Stefan



More information about the pypy-dev mailing list