Compare behavior before and after compilation
Compare the same interaction under controlled conditions
A useful experiment has three lanes: plain components without the compiler, manual memoization without the compiler, and the same plain source with the compiler. The first two lesson fixtures provide the manual and plain source. Keep the React and browser versions, data, CSS, build mode, interaction sequence and device constant. Use a production profiling-capable build for timings; ordinary production builds generally disable Profiler timing. Development StrictMode checks are valuable for correctness, but development timings and render counts do not establish production performance. No React or compiler package is installed in this authoring environment, so the following source and measurement protocol are staged.
export function makeTiles(count){ if(!Number.isInteger(count)||count<0||count>10000) throw new RangeError('count'); return Array.from({length:count},(_,i)=>({id:`tile-${i}`,name:`${i%2===0?'Quartz':'Moss'} ${i}`}));}With six tiles, quartz matches tile-0, tile-2 and tile-4. With 600 tiles the list has 300 quartz entries. Stable IDs support list reconciliation. Use the same immutable array instance for all unrelated counter updates. The small workload is intentional; enlarge it only if the test environment can handle it and the same size is used in all lanes.
Record actual commits without changing render logic
import React,{Profiler,useState} from 'react';import ManualCatalogue from './c41-l01-s06.jsx';import AutoCatalogue from './c41-l01-s08.jsx';import {makeTiles} from './c41-l03-s03.mjs';const tiles=makeTiles(600);export default function Trial({variant='plain',onSample}){ const [query,setQuery]=useState('quartz'); const [count,setCount]=useState(0); const Catalogue=variant==='manual'?ManualCatalogue:AutoCatalogue; return <main><label>Filter <input value={query} onChange={e=>setQuery(e.target.value)}/></label><button type="button" onClick={()=>setCount(c=>c+1)}>Unrelated update: {count}</button><Profiler id="catalogue" onRender={onSample}><Catalogue tiles={tiles} query={query}/></Profiler></main>;}Mount one variant per trial with a stable callback passed by the entry module. The initial list contains 300 entries and the counter is zero. Clicking the button changes the counter but not the matching list. Changing the query to moss selects the other 300 entries. A missing query produces an empty list. This expected behavior is an acceptance target, not an observation from a React run. The harness imports both variants for convenience; use separate build configurations so only the selected lane receives compiler optimization, and use infer mode for the plain component in the compiled lane.
export function createCollector(){ const samples=[]; return {onSample(id,phase,actualDuration,baseDuration,startTime,commitTime){ samples.push({id,phase,actualDuration,baseDuration,startTime,commitTime}); },read(){return samples.map(sample=>({...sample}));},clear(){samples.length=0;}};}The callback receives Profiler commit measurements when supported. actualDuration estimates render work for the committed update; baseDuration estimates subtree render cost without memoization. These are not network latency, full paint duration or a guarantee of interaction responsiveness. Keep the collector outside render and clear it between runs. Check the actual compiler output and DevTools optimization indicators; record skipped components and diagnostics. First verify output parity and keyboard behavior, then warm up each lane, perform identical repeated interactions and report sample distributions, hardware, build details and limitations. Do not invent numbers when no runtime is available. If behavior differs, revert the optimization or temporarily exclude the component while investigating. Practice: run the pure workload tests, then fill a comparison report only after approved builds exist.