Thanks for the explanation. Can you make sure this is explained in the PEP?
On Aug 11, 2017 10:43 PM, "Yury Selivanov" <yselivanov...@gmail.com> wrote: > > On Fri, Aug 11, 2017 at 10:17 PM, Guido van Rossum <gu...@python.org> > wrote: > > > I may have missed this (I've just skimmed the doc), but what's the > rationale > > > for making the EC an *immutable* mapping? It's impressive that you > managed > > > to create a faster immutable dict, but why does the use case need one? > > > In this proposal, you have lots and lots of semantically distinct ECs. > > Potentially every stack frame has its own (at least in async code). So > > instead of copying the EC every time they create a new one, they want > > to copy it when it's written to. This is a win if writes are > > relatively rare compared to the creation of ECs. > > Correct. If we decide to use HAMT, the ratio of writes/reads becomes > less important though. > > Yury >
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/