zc2707's blog

By zc2707, history, 9 months ago, In English

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.

  • Vote: I like it
  • +31
  • Vote: I do not like it

»
9 months ago, # |
Rev. 5   Vote: I like it +20 Vote: I do not like it

Here are the changes I made to the code in the blog to getting which prime got slowest.

code

In GNU G++20 11.2.0 (64bit winlibs) It give

x = 10273: 0.495 seconds
x = 20753: 1.110 seconds
  • »
    »
    9 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Wow I just tried 20753 and got 1.388 ms.

  • »
    »
    9 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Well 172933 and 85229 are fine. It gets TLE.