From 4181bacf4da3d718845d4f4874b1d50994284e25 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Thu, 1 Oct 2009 00:11:46 +0200 Subject: [PATCH] stone_other(): Force inlining --- stone.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stone.h b/stone.h index 51a682b..8114375 100644 --- a/stone.h +++ b/stone.h @@ -22,7 +22,9 @@ stone2char(enum stone s) return ".XO#"[s]; } -static inline enum stone +/* Curiously, gcc is reluctant to inline this; I have cofirmed + * there is performance benefit. */ +static inline enum stone __attribute__((always_inline)) stone_other(enum stone s) { static const enum stone o[S_MAX] = { S_NONE, S_WHITE, S_BLACK, S_OFFBOARD }; -- 2.11.4.GIT