ACEmulator / ACE

Asheron's Call server emulator.
https://emulator.ac
GNU Affero General Public License v3.0
297 stars 242 forks source link

Add some micro-optimizations to IntersectsSphere #4213

Closed FlaggAC closed 2 months ago

FlaggAC commented 2 months ago

Using the local variables when possible can simplify the branching optimization and fetch operations. This method is called very frequently, so even a small change can have an impact here. The positive effect of using local variables is non-zero even with the assumption that optimizations and CPU caching are under ideal conditions.

FlaggAC commented 2 months ago

This is probably not going to be helpful (maybe in Debug builds, which ACE mods tend to go with for some reason). Closing for now.