On Mar 15, 2008, at 2:23 PM, Stefan Behnel wrote:

> Hi,
>
> Robert Bradshaw wrote:
>> I think inlining
>> (which one can explicitly request in the C output) and loop unrolling
>> are well handled by GCC and is probably best handled at this
>> level for most things (for now at least).
>
> In general, yes. There is one thing that GCC can't do, however, and  
> that's
> dropping the INCREF/DECREF of parameters in an inlined function. So,
> especially for very short functions (where inlining makes the biggest
> difference), having Cython do the inlining would actually result in a
> performance gain.

Or, even better, detect when the incref/decref at the top and bottom  
of a function are unneeded, and remove them for all functions.

>
> But I agree that that's neither low-enough hanging fruit nor such a  
> major gain
> that it's worth doing it right now...
>
> Stefan

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

Reply via email to