This is super obscure, and not too big a deal in the real world.
Almost a year and a half since #139 and this is the first I've noticed any issues.
On all but one of my machines, with older GCC versions, my code runs as I intended. On lab1.5, my code runs as the C++ standard intends.
In April 2019, GCC was patched to make forward_list::sort stable.
WaypointQuadtree stores points in a forward_list container. This means, all this time, to get good DIFFs vs the Python version, I've been relying on a buggy compiler. I've been relying on my code working incorrectly. Should obviously fix that. :)
Using a stable sort with forward_list breaks things because its elements are essentially inserted backwards (forward_list has a push_front function, but no push_back).
How'd I notice; what was the symptom?
WaypointQuadtree::graph_points processed these 2 points in different orders, resulting in changing which vertex was named AL154@+x06 and which was named AL154@+x06|AL in the region, country, continent, and master simple graphs -- waypointsimplification.log was not affected.
This is super obscure, and not too big a deal in the real world.
Almost a year and a half since #139 and this is the first I've noticed any issues.
On all but one of my machines, with older GCC versions, my code runs as I intended. On lab1.5, my code runs as the C++ standard intends.
In April 2019, GCC was patched to make forward_list::sort stable.
WaypointQuadtreestorespointsin aforward_listcontainer. This means, all this time, to get good DIFFs vs the Python version, I've been relying on a buggy compiler. I've been relying on my code working incorrectly. Should obviously fix that. :)Using a stable sort with
forward_listbreaks things because its elements are essentially inserted backwards (forward_listhas apush_frontfunction, but nopush_back).listis what I want.A couple functions will accordingly need adjustment...
WaypointQuadtree::near_miss_waypointsnot actually necessary.(anything else?)Edit: Noticeably slower (2.03s 496e840 vice 1.83s 362587e; HighwayData @
b435cbd& UserData @7704317)Sorting waypoints in Quadtree. I'll attribute this to increased overhead in sorting a doubly linked list. No changeSorting graph index waypoints by name priority, which is already doubly linked.listas compared to aforward_listcould make Reading waypoints for all routes a bit slower. Noticeably? Certainly not much. Edit: No noticeable difference.How'd I notice; what was the symptom?
WaypointQuadtree::graph_pointsprocessed these 2 points in different orders, resulting in changing which vertex was namedAL154@+x06and which was namedAL154@+x06|ALin the region, country, continent, and master simple graphs -- waypointsimplification.log was not affected.