News for hackers. Stuff that matters.
Re:Using const/let instead of var can make JavaScript code r... by layoutIfNeeded on Wednesday October 21, 2020 @04:49AM (#24845963)
>[...] 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?

Re:Using const/let instead of var can make JavaScript code r... by austincheney on Wednesday October 21, 2020 @04:59AM (#24846004)
Hash map then.
Re:Using const/let instead of var can make JavaScript code r... by layoutIfNeeded on Wednesday October 21, 2020 @09:54AM (#24847888)
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...
Re:Using const/let instead of var can make JavaScript code r... by austincheney on Wednesday October 21, 2020 @12:01PM (#24849083)
Hash map properties are randomly accessed from memory opposed to array indexes.