Disassembling with objdump, I see only the char* + operator.
...But the char operator could just be inlined by the compiler.
Some inlining does appear to be happening, as sort_root_at_label and nmplogs also change.
BiggaTomato
function
lines
bytes
sort_root_at_label
-75
-288
root_at_label
41
160
nmplogs
-96
-352
Counterintuitively, root_at_label gets bigger. Go figure.
TBD: Is this the case on other machines?
The damage from this should be minimized, though:
nmplogs has...
2 calls to sort_root_at_label (the 2nd is within a loop)
2 calls to root_at_label, but called half the time per the result of (looped) sort_root_at_label
For simplicity we can call this the equivalent of 1 unconditional call.
sort_root_at_label has bigger deltas, so the time savings here probably outweigh the slowdown.*
The only other uses of bare (outside the sort function) root_at_label are in flagging detected datacheck errors in HighwaySystem::route_integrity, and should thus be quite rare:
2 flavors of DISCONNECTED_ROUTE
2 flavors of VISIBLE_HIDDEN_COLOC (still in-dev right now, but expected to be committed Real Soon Now)
sort_root_at_label is otherwise used in WaypointQuadtree::sort(), which should get faster.
*Maybe. This is an assumption; the true results depend on how many clock cycles the underlying instructions take. That's farther into the weeds than I wanna go, LOL.
https://github.com/yakra/DataProcessing/blob/f86fadc9479d6ad91852c6c38d35f641b70ec6ef/siteupdate/cplusplus/classes/Waypoint/Waypoint.cpp#L180-L182 ->
objdump
, I see only thechar*
+ operator. ...But thechar
operator could just be inlined by the compiler.sort_root_at_label
andnmplogs
also change.BiggaTomato
Counterintuitively,
root_at_label
gets bigger. Go figure. TBD: Is this the case on other machines?The damage from this should be minimized, though:
nmplogs
has...sort_root_at_label
(the 2nd is within a loop)root_at_label
, but called half the time per the result of (looped)sort_root_at_label
For simplicity we can call this the equivalent of 1 unconditional call.sort_root_at_label
has bigger deltas, so the time savings here probably outweigh the slowdown.*root_at_label
are in flagging detected datacheck errors inHighwaySystem::route_integrity
, and should thus be quite rare:sort_root_at_label
is otherwise used inWaypointQuadtree::sort()
, which should get faster.*Maybe. This is an assumption; the true results depend on how many clock cycles the underlying instructions take. That's farther into the weeds than I wanna go, LOL.