I have a n*n*n array in javascript, in which i need to perform a LOT of access.
I don't need to access all elements sequentially, but at specific positions only. I also want, if possible, not to allocate all the memory of the array cells until it's used (other it would take several MB of memory directly).
I'm looking for the most efficient way to do so. I tried to use a dictionnary indexed by a built key ( x + '#' + y + '#' + z ) but it's cleary not efficient enough.
Could you suggest some other efficient ways to achieve this ?