19 Nov
2018
19 Nov
'18
11:50 a.m.
On Sun, 18 Nov 2018 16:53:19 +0100
Stefan Behnel
So, in Cython, we use macros wherever possible, and often avoid generic protocols in favour of type specialisations. We sometimes keep local copies of C-API helper functions, because inlining them allows the C compiler to strip down and streamline the implementation at compile time, rather than jumping through generic code. (Also, it's sometimes required in order to backport new CPython features to Py2.7+.)
Also this approach allows those ballooning compile times that are part of Cython's charm and appeal ;-) (sorry, couldn't resist) Regards Antoine.