HashMap size

Discussion in 'Plugin Development' started by Koguro, Apr 26, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Koguro

    I'm planing to make a plugin that will require some large hashmaps of strings. I was just wondering, how large can a HashMap be before it becomes an issue for performance?
     
  2. Offline

    Serializator

    I do not think there is an maximum amount of variables in a map before there is going to be performance issues.
     
  3. Offline

    raGan.

    Actually there is, but it's very many. Hash codes gotta run out once, and when that happens, it's downhill from there. I don't think it would ever matter though.
     
  4. Offline

    SnipsRevival

    Assuming the keys are evenly distributed among the possible positions, I doubt performance would be affected in any noticeable way even for a large amount of keys. However, you could always just try performing a test by inputting however many Strings you expect to be in your HashMap and see how long it takes to find any given key.
     
Thread Status:
Not open for further replies.

Share This Page