[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] engine/influence.c (and DFA)
From: |
Dave Denholm |
Subject: |
[gnugo-devel] engine/influence.c (and DFA) |
Date: |
03 Sep 2002 12:07:15 +0100 |
Hi,
I was just having a look at influence.c, since that is where the
profile shows the most time being spent.
Noticed something odd about the unrolled loop in accumulate_influence():
it still has 'continue' statements in it, which means, unless I'm missing
something obvious, the behaviour is different when the loop is unrolled or not.
When the loop is not unrolled, the continue means to go and do the
next direction.
But when the loop is unrolled, the same continue statement means
abandon this queue entry entirely, and go on to the next one.
- might explain why gprof -l only seemed to care about the first few
expansions of the macro ?
[ I was actually just looking to see if the / (b*c) could
be turned into a single multiply, eg c is 1 for straight and
2 for diagonal, so could set invb = 1/b initially, then halve it
after doing the straight ones. Then just multiply by invb rather
than dividing by (b*c)
Oh - and ((arg_di)*(i-m) + (arg_dj)*(j-n)) is evaluated twice - don't
know if the compiler is smart enough to spot this, given the separation
And could store the inverse damping factors so they can be multiplied
rather than divided. Or store (current_strength / damping) as a loop
invariant...
]
On another matter entirely, in light of changing the DFA, I was pondering
whether the grid matcher approach could be used - ie match 3x3 grids of
intersections at a time. But I don't understand the DFA well enough
to know if this is a stupid idea.
[ I was doing the profile just to confirm how much time is spent
doing matching...
]
dd
--
address@hidden http://www.insignia.com
- [gnugo-devel] engine/influence.c (and DFA),
Dave Denholm <=
- Re: [gnugo-devel] engine/influence.c (and DFA), Arend Bayer, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Dave Denholm, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Evan Berggren Daniel, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Arend Bayer, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Marco Scheurer, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Dave Denholm, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Arend Bayer, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Marco Scheurer, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Gunnar Farneback, 2002/09/03
- Re: [gnugo-devel] engine/influence.c (and DFA), Dave Denholm, 2002/09/03