Open yakra opened 2 years ago
I forget what exactly happened here. IIRC Python showed no improvement. If C++ did at all, it was slight -- and was it overshadowed by #504? Spreadsheet notes aren't clear; sulogs should be in the late Feb - March 3 2022 ballpark. That's right about when I started versions.txt; does one exist?
I closed #504, then a day later marked this low priority
, indicating I wasn't completely done with it.
There are enough other things to tweak nearby, in particular how unordered_maps are handled, that this can wait till afterwards to see if it's any help.
search for
mileage_by_region
Travelerlist::active_preview_mileage_by_region
andTravelerlist::active_only_mileage_by_region
can become a singlestd::unordered_map<Region*, double[2]>
• fewer lookups • fewer exceptions • fewer creations NO-BUILD -- no noticeable speed increase.active_only_...
,active_preview_...
&overall_...
dicts • Nothing to change in C++; these data are members of theRegion
class. LOW PRIORITY -- between 'T' having next to no effect with 4.5x (6.74 travelers per segment * 2/3 the dict lookups) as many lookups, and 'C' having next to no effect going from 1 lookup/segment to 1 lookup/route, I don't expect much here.(deleted stash @ bc351591af3159b764b8e07f10be7dfec4dae2bd / sulogs @ 2022-02-28.py/T3.tar.lzma) Too little IMO to justify the... distasteful, rounding needed to get
t.active_systems_clinched
&t.preview_systems_clinched
to come out right. Even if the same is done (via a float conversion) in C++. Maybe? C++: Look into constructing & iterating thru per-region route lists. No need forregion->mtx
(even though speed already rounds to 0). Should be able to lose the float conversion that way. Low priority.