[Pachi] Converting tree children linked lists to arrays

Petr Baudis pasky at ucw.cz
Sun Sep 7 11:10:36 CEST 2014


  (That email went in three different directions, so I'm trying
to keep the stuff untangled. :-)

  (Short intro: It should be quite faster if we allocated all tree
children node structures en bloc during node expansion - eat less
memory and better locality.  I gave up on that project but Sthalik
offered to help.)

On Fri, Aug 08, 2014 at 06:55:11PM +0200, Stanisław Halik wrote:
> FWIW, still remember the discussed project to do with removing
> needless indirection.
> Since discussing it on IRC was a pain... is node sibling pointer
> needed when turning child node pointers galore into an array? There
> was code that relies on the sibling pointer, and hardly able to make
> it up to spec without getting the underlying idea.

  I don't *really* remember either. :-)

  But how would I find out?

	git grep sibling

and go through all the matches (there isn't that many of them).  From
cursory examination, it seems in all of them (besides current tree
manipulation code) sibling pointer is used just for iteration, so if
we had an array instead we could get rid of it.

  I think getting rid of this pointer was supposed to be one of the
advantages here.

				Petr Baudis

More information about the Pachi mailing list