[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [computer-go] Dynamic-memory in Go?



----- Original Message ----- From: "chrilly" <chrilly@xxxxxxxxxxxxxxxxx>
To: "computer-go" <computer-go@xxxxxxxxxxxxxxxxx>
Sent: Sunday, September 12, 2004 11:01 PM
Subject: [computer-go] Dynamic-memory in Go?



Maybe there is in Go - besides breadth-first-search - another place where one needs dynamic-memory-allocation. If yes, I would be interested for which parts dynamic memory is needed.


I use it to allocate brances & nodes when I load SGF. Some SGF is a huge tree (Kogo's) and pre-allocating a fixed (max) number of branches & nodes would be wasteful and risky. Dynamically allocating memory for search seems a bad idea to me (speed-wise). Why would you burden a tree search with the overhead of allocating/freeing stuff..

I agree with you about not doing memory management inside search.

If you write your own memory manager that aligns on cache lines and does other fancy things, perhaps you can speed up things a lot compared to the out-of-the-box MM, but the best is not to do any memory management at all inside speed-sensitive routines.
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://www.computer-go.org/mailman/listinfo/computer-go/