Hi Armin, Thanks for your feedback. As you mention there needed some more research on this problem, so I think I should not apply for GSoC and rather do some work out of its scope. A special-case GC interface is interesting direction and I am going to take a look at weekrefs.
Cheers, Nikolay. чт, 24 мар. 2016 г. в 0:39, Armin Rigo <ar...@tunes.org>: > Hi Nikolay, > > On 14 March 2016 at 19:15, Николай Зинов <nzi...@gmail.com> wrote: > > I found implementing copy-on-write list slicing particularly interesting > for > > me. Below go my ideas. Note, that at some places I see different possible > > choices so I need feedback. > > Thanks for the early proposal; you should submit it to google's system > very soon. I'm sorry it didn't receive more active feedback from the > main mentors. One of the reasons is that this is likely more involved > than you describe. > > In order to efficiently implement copy-on-write list slicing, we would > need some special GC support. Otherwise, as you describe, there is > the problem that as soon as there exist a slice anywhere, we cannot > any more modify a big list without making a copy of the whole list. > Moreover, there is also the issue that if 'mylist[1:5]' is kept alive, > then the whole 'mylist' is also kept alive, even if it would not be > necessary; this can consume some extra memory but more importantly it > can delay calling destructors for arbitrarily long periods of time. > > So, serious work on this topic should start with designing a usable GC > interface which fixes these problems; a bit like weakrefs, which are a > general GC interface. The problem is that we don't really know what > such an interface could look like. > > > A bientôt, > > Armin. >
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev