Hacker News new | ask | show | jobs
by layoutIfNeeded 2062 days ago
>[...] discovered that access to object properties is faster than accessing array indexes half the time. That was in C language, but it holds true in JavaScript.

What are these object properties in C?

1 comments

Hash map then.
Hm. So you're saying that indexing into a hash map can be faster than indexing into an array? How would this be possible? I mean, under the hood a hash map is going to an array too, which is being indexed based on the hash value...
Hash map properties are randomly accessed from memory opposed to array indexes.