agents/skills/chrome-performance-optimizer/references/optimization_patterns.md
Proven architectural and engine-level optimization patterns for Speedometer 3 and JetStream.
childElementCount,
firstElementChild, nextElementSibling, slot assignments) causes repeated
tree traversal overhead and pointer chases.ElementTraversal, LayoutTreeBuilderTraversal,
FlatTreeTraversal.moveTo/lineTo/arc calls per frame, allocating Skia SkPathBuilder verbs
on every API invocation.Vector<gfx::PointF, 32>).
Defer Skia path building until stroke() or fill(). For single-line strokes
(IsLine()), dispatch direct c->drawLine calls to skip path construction
entirely.CanvasPath::LineBuilder, CanvasRenderingContext2DState.kPrimaryTableBits and kSecondaryTableBits in
v8/src/ic/stub-cache.h to retain handlers for diverse receiver maps across
benchmark iterations.StubCache, LoadIC, StoreIC,
CodeStubAssembler::TryProbeStubCache.Array.prototype.forEach,
Array.prototype.filter, Array.prototype.map) cross boundary accessors,
falling back to generic bytecode calls.maglev-graph-builder.cc, turboshaft/operations.h.