Re: [Python-Dev] Review request: issue 27350, compact ordered dict

2016-08-10 Thread Maciej Fijalkowski
Hello everyone. I did do only a cursory look on that one, but I would like to reiterate that this gives huge benefits in general and we measured nice speedups on pypy (where all the dicts are ordered forever): * you can essentially kill OrderedDict or make it almost OrderedDict = dict (in pypy it

Re: [Python-Dev] Rewrite @contextlib.contextmanager in C

2016-08-10 Thread Nick Coghlan
On 10 August 2016 at 04:43, Giampaolo Rodola' wrote: > > > On Tue, Aug 9, 2016 at 3:30 PM, Nick Coghlan wrote: > >> On 9 August 2016 at 23:26, Nick Coghlan wrote: >> >>> On 9 August 2016 at 06:18, Guido van Rossum wrote: >>> I think Nick would be interested in understanding why this is th

Re: [Python-Dev] Review request: issue 27350, compact ordered dict

2016-08-10 Thread INADA Naoki
Thanks you for supporting. BTW, my patch doesn't include OrderedDict speedup. (I'll try it when compact dict is merged.) In case of Python 3, OrderedDict.move_to_end(key, last=False) can append item at front. So implementing OrderedDict based on compact dict is not so easy as OrderedDict = dict.

Re: [Python-Dev] Rewrite @contextlib.contextmanager in C

2016-08-10 Thread Chris Angelico
On Wed, Aug 10, 2016 at 4:43 AM, Giampaolo Rodola' wrote: > Chris' SimplerContextManager solution is faster because it avoids the > factory function but that is necessary for supporting the decoration of > methods. Hooking a tangent onto this: I have no idea, based on the current source code, whi