update: Reorder sector production for speed

The update visits sectors in increasing order of country number.
Within a country, it visits in increasing order of sector number,
which is effectively top to bottom, left to right, starting with
absolute 0,0.

The order doesn't actually matter.  Before Chainsaw's option BUDGET,
the update simply visited the sectors in sector number order.  Go back
to that order, because it's faster.  For the update, it's a few
percent in my testing.  For budget, it's more than a third.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-07-13 22:02:40 +02:00
parent c5df505c98
commit 5a548c9901
12 changed files with 132 additions and 127 deletions

View file

@ -31,7 +31,7 @@ This document gives a rough order of events during the update.
b) plane maintenance, in order of plane number
c) land unit maintenance, in order of land unit number
pay maintenance, then feed and plague people on board
d) sectors, in order of country number
d) sectors, top to bottom, left to right
a) people in non-sanctuary sectors eat
If not enough is available, the excess people will
starve off. No more than 50% of the people