Embed presentation
Download as PDF, PPTX

















The document discusses how TraceMonkey in SpiderMonkey uses shape-based polymorphic caching to optimize property access performance in JavaScript. It explains that TraceMonkey analyzes programs to build a cache of property lookups based on the shape of the object accessing the property. If a subsequent access has the same shape, it can skip the lookup and directly access the property through the cache, improving performance. The shape of an object is determined by its class, property names, types and order, so objects with different shapes require different lookups even if they represent similar data.















