Hacker News new | past | comments | ask | show | jobs | submit login

V8 does not use "hidden C++ classes." It specializes a memory layout for each object layout and uses tracing to optimize property access into direct offset reads/writes.



I'm willing to believe you, but I didn't make that up, I was just cribbing from the link: To reduce the time required to access JavaScript properties, V8 does not use dynamic lookup to access properties. Instead, V8 dynamically creates hidden classes behind the scenes.

I gather a "hidden class" is not an idiom of C++ as I'd assumed, rather something V8 people made up, but that's what they call it.


the technique is called "inline caching". "tracing" is a completely different approach to JITs.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: