Hm, maybe something that (during resize) measures both the maximum load encountered while resizing in both the new and old backing vector, and upgrades if it does not decrease sufficiently? That way, you avoid having any added code in the hot paths of insert and lookup.
Well, for one, "which linker?"
Invoking the linker isn't especially bad, as there are basically only two options in terms of "how to invoke it" (ld
vs. link.exe
), and which one to use is clear from the target. However, if you're going to parse the output, you're now going to get tripped up by different output from ld.bfd
vs. ld.gold
vs. different versions of same vs...