[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [computer-go] SGF parsers
On Dec 14, 2004, at 12:10 PM, Darren Cook wrote:
Sen:te Goban's parser is based on an optimized version of sgf.c by
Antti Huima. It takes 36 seconds to read the 20300+ files, ~40MB of a
GoGoD distribution, to build the trees in memory and to create game
record references that include the number of moves and the game
signature.
How much memory does the tree use once in memory?
I'm disappointed with my SGF parser (built using Spirit library for
C++) as I found there were trade-offs in ease of writing, speed of
parsing, size (overhead) of data structures, and ease of using it to
actually do things with the game data. I kept changing my mind as I
wrote it so I have a mess that fails on all 4 criteria :-(.
The number of bytes allocated per tree is on average 10580, for a total
of 209 MB . In my case I usually do not keep all the tree in memory at
once. Once a file is parsed and it's attributes known and indexed, it
is freed (and in my particular case the whole tree is zapped at once,
avoiding costly recursive freeing of each node and property).
marco
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://www.computer-go.org/mailman/listinfo/computer-go/