Region processing does a lot of looping--when there are actually
regions present--and calls functions in those loops which do more
looping of their own. This moves some of the simpler tests so that
they get done sooner and can avoid some of those function calls.
I was hoping that it would speed up the turn cycle on the Plane of
Fire where the spontaneous irregularly shaped fumaroles are composed
of a lot of small regions but I don't think there's any noticeable
difference.
In process of doing that, I discovered a bug (no doubt copy+paste
which escaped an intended update) with monster handling. The check
for whether a monster is entering a region depends upon whether the
hero is in that same region rather than whether the monster is
already inside. So a monster can enter a region--or have a moving
one enclose it--with impunity if the hero is already in that region.
Once the hero moves out of it, the monster will finally enter it.