Ticket #145 (closed enhancement: duplicate)
Hashing and caching upgrade + scan_board + lot of small changes
| Reported by: | draqo | Owned by: | gnugo |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | source | Version: | |
| Severity: | minor | Keywords: | cache hash caching hashing scan_board |
| Cc: | patch: | yes |
Description
I upgraded files cache.c/h and hash.c/h. The main change is that tt_update replaced the newest node even when that node was stored in the most_reliable (I changed names too) node or the added node total_cost was lower. After that I counted stats for 10 games of the old and new version of the program and average hits per move got better - old version had 110420 hits (89785 trusted) and new 128846 (104325).
Beside that there is lot of small changes that don't change mechanics of the program. Sometimes they are really small like change from x++ to ++x :-) But when I read the code line by line and saw something I made changes (I'm sometimes perfectionist :)
One change that have some impact is a new macro named scan_board. It scans each vertex of the board and run some code for them. It is faster than old for loop and testing if a field is GRAY - on 19x19 the difference is minimal but on 9x9 is bigger.
Also I have 2 questions: 1). When new patches are applied? Only when new version is released or earlier - when somebody accepts it? 2). When I post a patch and later change something in the same file and want to post second patch these 2 patches will have a lot in common and checking them and applying would cause some problems. What should I do - wait for the first patch to be accepted, delete the first patch and post only second (maybe in both places) or something else?
