2

Ok, I have tried searching the web for different modules for me to use but it didn't make me any wiser. There where so many different alternatives and I couldn't find any good discussion on wich was the better.

I need a hashmap with a 5 digit decimal number as key, and with arrays as values. I need to effectively iterate through its keys as well a couple of times per second.

Anyone have a good recommendation of what I should use?

Thank you! //Svennisen

Svennisen
  • 194
  • 1
  • 9
  • possible duplicate: http://stackoverflow.com/questions/225367/is-there-any-good-javascript-hashcode-table-implementation-out-there – go-oleg Jul 30 '13 at 23:47

1 Answers1

3

I realised I do not need a module at all. Since in javascript an array with a string index is automatically considered a map with key,value instead of index,value.

So I just convert my number to a string and use an ordinary vector.

Svennisen
  • 194
  • 1
  • 9