Stefan Behnel, 25.11.2010 14:49:
> Vitja Makarov, 25.11.2010 13:39:
>> Hi, I've tried to optimize closures.
>>
>> I think I should create ticket for this.
>
> Yes, please do. There doesn't seem to be one yet.
>
>
>> Closure optimizations:
>>    * Don't add entries to closure if they will not be later used
>>    * Don't add outer scope to closure if it will not be used
>>    * Don't pass closure scope to functions that don't use it
>>    * Don't create empty closure classes.
>>    * If closure class contains outer scope only pass outer scope
>> directly (called is_passthrought)
>>
>> Please review attached patch.
>
> I took a quick look through it and it looks good. The tests still pass,
> although I'm not very confident in the closure tests that we have, given
> that there aren't many that involve typed closure variables or type
> inference. But at least those that are there didn't break.
>
> Anyway, I think the patch is good enough to push it on to Hudson to see
> what it has to say about it.

Hudson says: no degradation at all. :)

Thanks again, this is a huge improvement.

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

Reply via email to