Re:LuaJIT Remake: An ongoing attempt to re-engineer LuaJIT f...
by inglor on Sunday November 27, 2022 @01:55AM
(#33761013)
The optimization is usually called shapes outside of JS.
The idea is that shapes (we represent objects like C like structs and not hash maps) are used for relatively non-dynamic objects and then we keep the shape metadata on functions themselves (inline caches) which means property access becomes just a byte offset.
The idea is that shapes (we represent objects like C like structs and not hash maps) are used for relatively non-dynamic objects and then we keep the shape metadata on functions themselves (inline caches) which means property access becomes just a byte offset.
See https://v8.dev/blog/fast-properties