I read Blowing up unordered_map, and how to stop getting hacked on it but it doesn't work for GNU C++20 (64). Custom invocation of the hack shown in the blog shows: ~~~~~ x = 107897: 0.064 seconds, sum = 2666686666700000 x = 126271: 0.055 seconds, sum = 2666686666700000 ~~~~~ which means that this hack doesn't work.