user log speedup / remove redundant computation #526
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a do-over of #524.
Closes yakra#220.
Closes #523.
Closes #522.
C++ Region management is on the backburner.
There are a couple different paths forward here, and I'm not 100% sold on either. Kicking that can down the road.
User log speedup
Small improvement on Linux; big one for FreeBSD.
For just FreeBSD, the chart below includes an intermediate step:
the initial conversion of
std::string to_write
tostd::vector<std::pair<Route*, double>> chop_mi
(not included for Linux, as the lines are already so close together it'd just add clutter).
After that, the next step was to have
format_clinched_mi
format & return achar*
. Same idea as what #515 did withclinchedby_code
in traveled graphs.Alternate version with 2x the vertical scale, to compare against this one from #520. And before that, there was #513.
Future?
There may be more improvements to be had by playing around with the
std::unordered_map
s or converting tostd::map
s.Sometimes small changes make big results (see #517). But OTOH, we could be approaching the point of diminishing returns.
Call me cautiously optimistic.