Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: Profiling Civserver again
Home

[Freeciv-Dev] Re: Profiling Civserver again

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Profiling Civserver again
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Wed, 1 Aug 2001 23:02:38 +0100 (WET DST)

Well does gcc optimize it this way?

#define map_adjust_x(X) \
  (((X) % map.xsize) + (((X >= 0) - 1) & map.xsize))
 
This is faster. Its faster on all CPUs. Notice it doesn't have any
branches. Of course its also pretty darn unreadable :-)

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa



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