Most efficient way to access a multidimensional array in javascript?

There's no faster way to access objects than a dictionary method, I'm afraid, because that's what everything in Javascript is, really. To not allocate the memory, you can use an object instead of an array.

I think your multidimensional array is perfectly fine. If created sparse, it will not eat up all the memory, and act more like a simple "dictionary" object - you could use nested objects as well. Yet, I'd propose that the nested lookup will be faster than in a huge dictionary, since the hash function gets simpler with less keys.

Also, loading or iterating a full array from the innermost dimension will be noticably faster than querying each single item from the huge dictionary.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions