You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replacing this with a HGVertex* within each Waypoint might improve...
Speed:
No need to build a hash table, or any of the temporary structures used in its creation.
Just assign the pointer a value. Threadsafe!
Grabbing our vertex location from a known location within a waypoint should be faster than messing about with hash tables.
RAM:
About 1/3 of waypoints won't reference a vertex, and their pointers will be unnecessary, but this is more than outweighed by avoiding storing two pointers for the other 2/3, + the overhead of the std::unordered_map container. ...Or not. We still need some container to iterate through...
I don't expect these changes would have the same impact in Python with its wibbly-wobbly type system.
Mm yes. Quite nice. Compare to the previous graph here.
This also yields improvements beyond just Creating unique names and vertices. Before & After times:
task
BT
lab1
lab1.5
lab2
lab3
Creating edges
2.75 1.979
1.586 1.139
1.862 1.374
1.945 1.431
2.531 1.911
Compressing collapsed edges
1.47 1.263
0.855 0.711
1.057 0.908
1.022 0.878
1.312 1.137
Writing master TM graph files
7.086 6.443
6.059 5.461
4.369 3.856
7.474 6.632
9.539 8.668
Creating area data graphs
1.394 1.04
0.569 0.558
0.588 0.582
0.691 0.68
0.885 0.866
Times were measured with siteupdateST. Partly for simplicity, and also because:
Creating & collapsing edges is still a single-threaded task anyway
Area graph times could be polluted by adjacent region or multiregion graphs if multi-threaded
Can't find master graph end time when multi-threaded. Time could be thrown off by concurrent DB writing, even with siteupdate -t 1
Activity
[-]nix 2020-12-29 hash table[/-][+]nix vertices hash table[/+]yakra commentedon May 14, 2021
Mm yes. Quite nice. Compare to the previous graph here.

This also yields improvements beyond just Creating unique names and vertices.
Before & After times:
1.979
1.139
1.374
1.431
1.911
1.263
0.711
0.908
0.878
1.137
6.443
5.461
3.856
6.632
8.668
1.04
0.558
0.582
0.68
0.866
Times were measured with siteupdateST. Partly for simplicity, and also because:
siteupdate -t 1yakra commentedon May 15, 2021
Python:
Indeed, we only save about 0.1s. Going no-build for the sake of keeping a simpler commit history.
egrM6: threaded vertex construction
hgvM7: threaded vertex construction