[Pachi] Low-hanging fruit - hacking ideas
pasky at ucw.cz
Mon May 30 18:45:07 CEST 2011
On Mon, May 30, 2011 at 05:16:19PM +0100, Matthew Woodcraft wrote:
> Petr Baudis wrote:
> > * board_safe_to_play() calls in 3x3 pattern checks - we do this
> > way too often, repeatedly for the same coordinates in the same situation
> > and this shows very high on profiles. Fixing this might lead up to 10%
> > speedup of Pachi playouts.
> I had a quick look at this, but as far as I can see board_safe_to_play()
> isn't called in the current code, because BOARD_TRAITS is disabled (on
> master). Or is there another branch that's better to look at?
Oh, I'm sorry. I meant board_is_valid_play(), at least that seems to be
the cause of the
12.83% pachi ./pachi [.] apply_pattern
profile entry - the core goal is to fix this since apply_pattern()
really should be much faster than that I believe.
Petr "Pasky" Baudis
UNIX is user friendly, it's just picky about who its friends are.
More information about the Pachi