gnugo-devel
[Top][All Lists]
Advanced

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

Re: HAVE_INLINE (Re: [gnugo-devel] engine/influence.c (and DFA))


From: Arend Bayer
Subject: Re: HAVE_INLINE (Re: [gnugo-devel] engine/influence.c (and DFA))
Date: Wed, 4 Sep 2002 02:30:24 +0200 (CEST)

On Tue, 3 Sep 2002, Marco Scheurer wrote:

> Like loop unrolling, inlining functions can have adverse effect on the
> cache hit rate, and should be used only for small functions.

Well for a function as liberty_of_string in board.c (one of the most
frequently called functions at all), I'd be quite optimistic that it
would have a positive effect.

Arend


int
liberty_of_string(int pos, int str)
{
  ASSERT_ON_BOARD1(pos);
  ASSERT_ON_BOARD1(str);
  if (IS_STONE(board[pos]))
    return 0;

  return neighbor_of_string(pos, str);
}






reply via email to

[Prev in Thread] Current Thread [Next in Thread]