The required size is known - the Join map in both cases gets an entry for each variable from both input maps (union). This avoids the unnecessary cost of repeatedly growing the map.
This improves ReleaseLTO-g compile time for CTMark projects by an average of around 0.2%.