Closed yakra closed 4 years ago
Removing Route::awf_mtx
has no tangible effect. Single-threaded on BiggaTomato, we're 0.19s faster. In theory, we should be slightly slower, due to creating new lists and then iterating through them. BT @ 2thr 0.21s faster (the only change not obviously within this margin of error), BT & lab1 @ 3thr 0.13s faster, lab2 @ 1thr 0.18s faster; all other gains < 0.1s. lab2 is slower in 8/16 configurations; same speed in 2; lab3 slower in 19/24 configurations & unchanged in 1.
Going to KISS & go no-build on this.
This tells me that hashing is pretty fast, and there's enough other stuff going on during a ReadWptThread
to make the mutex locks pretty infrequent, making our losses from collisions pretty close to zero.
[x]
// strip whitespace
inRoute::read_wpt
Leftover code from the early "translate from Python" days. We don't need to do this in C++, because strtok takes care of it for us. Tabs aren't permitted as delimiters; in theory they should not be in a .wpt anywhere.[x]
strtok_mtx
Eliminate viastrcspn
and the "strtokless strtok".[x]
Route::awf_mtx
This accounts for how much of our loss of efficiency after 8 or 9 threads? We can eliminate it by...Route::read_wpt
alist<string>*
from an arraylist::emplace_back
list::back
reference for ourifstream
&el
all_wpt_files
afterReadWptThread
s finish.Quite like https://github.com/TravelMapping/DataProcessing/pull/311.