From: Nicolas C. <war...@fr...> - 2003-03-25 01:52:17
|
> > I'm currently still working on the List implementation... okay , > > some words about it : I'm currently at Kyoto, and having everyday at lunch > > some ocaml-talks with Jacques Garrigue, and when I told him about this > > setcdr trick, is first reaction was that it would be nice but perhaps there > > is some GC issues since that can create pointers from the major to the minor > > heap, and then causing speed overhead. > > I'm only using setcdr on list elements I just recently allocated, which > makes it signifigantly less likely that I would be adding a pointer from > the major to the minor heap. Possible, but not likely. Actually, it depends ! For example the map function is calling an user function, that can do lots of things, resulting a minor heap collection, and then back to ExtList.map your root has been moved to major heap. But Damien Doligez conclusion was that it will only occur once at a time, since next GC will put everything in the major heap, so the cost is very low. Nicolas Cannasse |