Uh oh!
There was an error while loading. Please reload this page.
various minor improvements - #505
Closed
yakra wants to merge 7 commits into
Closed
Conversation
interactive rebase b54179c4e74277197b9d4efbcd47a01094f39179
This was introduced after the switch to clang, but only g++ reports it.
Doesn't need to be permanent.
cherrypick 1d29004ed4436f8b1d8db5b36f8e2587f3d37d48
yakra
commented
Mar 20, 2022
ContributorAuthor
I thought this was ready for production, but at the last minute have come across some even better ways to approach some of the things that have been changed. Putting this on hold. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
d2cdcaa set/map/dict cleanup
closesyakra#199
On the C++ side, this was mostly conceived as code-readability cleanup, but it ended up saving a little time on userlog generation, more noticeable on slower machines like lab3.
Python: In theory, saves a wee bit of time, not having to create new list objects from objects that are already iterable/searchable. In practice, it's down near the margin of error; the tiny improvements we can consistently see disappear under the larger fluctuations that happen naturally between runs in other parts of the program. Either way, the code's slightly cleaner.
c8b3c98 eliminates an unnecessary membership test
DataProcessing/siteupdate/python-teresco/siteupdate.py
Line 3603 in d2cdcaa
DataProcessing/siteupdate/cplusplus/classes/TravelerList/userlog.cpp
Line 68 in d2cdcaa
The first half of the check is unnecessary because to get here...
DataProcessing/siteupdate/python-teresco/siteupdate.py
Lines 3580 to 3583 in d2cdcaa
DataProcessing/siteupdate/cplusplus/classes/TravelerList/userlog.cpp
Lines 43 to 46 in d2cdcaa
...
t_system_overallhas to be non-zero. But it's just been initialized to zero, and the only way for it to be set otherwise isif h.systemname in t.system_region_mileages.597682e pyfloat
closesyakra#196
C++: minor speed improvements emulating "Python-style floats", where a single ".0" is appended to integer values.
Waypoint::strandWaypoint::nmplogswrite to nearmisspoints.log & tm-master.nmp respectively.Route::csv_lineand optionally adding "pyfloat" support toConnectedRoute::csv_lineto conform, these functions were removed in favor of inserting their elements directly into the file stream in sqlfile, for a small speedup. Python-style floats were dropped in the process; the odds of a Route or ConnectedRoute's mileage being an exact integer are close to zero. I'll cross that bridge if & when I come to it.TravelerList::userlogis no-build for now, to avoid merge conflicts. I anticipate refactoring the relevant bits of code into thesqlfile1function.6e0693f fix potential buffer overflow & a3b35e0 comments
are what they say on the tin.
3ae68f1 don't store
updatein TravelerListsaves a tiny bit of RAM.
d56e5a6 update info retrieval
cleans up & consolidates the code that finds the update date & time for each .list file upon construction of its TravelerList object.