Thread: Wishlist Battle AI hooks
View Single Post
  #17  
Old October 5th, 2010, 02:54 AM
WraithLord's Avatar

WraithLord WraithLord is offline
General
 
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
WraithLord is on a distinguished road
Default Re: Battle AI hooks

The source code is in C or C++ right?- If so, there are optimizations for compound IF statements that the compiler can do when writing the assembly code. Also, IIRC the dev can "help" the compiler optimize by keeping to certain forms. I don't recall the details as my course on this was 12 years ago and I'm not doing this as common practice.

Anyway, lots of IFs shouldn't have such an impact on performance. It's usually IO and blocking threads that kill performance - both not relevant to turn processing.
Reply With Quote