Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How Javascript Engines access/lookup property names? what kind of associative ar

ID: 648367 • Letter: H

Question

How Javascript Engines access/lookup property names? what kind of associative array (data structure or search/lookup algorithm) did they use? (for V8, TraceMonkey, JSC, and Rhino)

For example, in C++ there are map and unordered_map that uses (mostly) RB-Tree and Hash Table, but what for JavaScript Object/{} what kind of associative array did the use for each engine?

Or maybe more specific, how they store a JSON object internally?

Some answers that I've found, in V8, they use additional Hash Table (slide 45)

Explanation / Answer

JIT compilation tracing techniques often make "hot" objects transformed into instances of hidden (and dynamically created) classes or structures, for which property access becomes as fast as field access in a C struct

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote