What are hidden classes in V8 and why do they matter for performance?
Internal labels assigned to objects based on their shape (property names and order). Objects with the same hidden class share optimized code. Different shapes cause deoptimization, which hurts performance. Keep object shapes consistent.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in JavaScript Engine Interview Questions
Both. Modern JS engines use JIT (Just-In-Time) compilation: they interpret bytecode (Ignition) for fast startup and compile hot code to machine code (TurboFan) for performance. It is not purely interpreted or purely compiled.
No. The event loop is part of the host environment (browser or Node.js/libuv). V8 provides the call stack and heap. The host provides the event loop, Web APIs, and queues for async behavior.
Generational mark-and-sweep (Orinoco). Young generation collected frequently (scavenge). Old generation collected less frequently (mark-sweep-compact). Incremental and concurrent to minimize pauses.
Still have questions?
Browse all our FAQs or reach out to our support team
