1+{
2+ "published": [
3+ {
4+ "base": "e4164e273bd9dbe5d4979e113796e16d065529c1",
5+ "head": "e4164e273bd9dbe5d4979e113796e16d065529c1",
6+ "cob": "3ca625ba9d95f8b5384280cf3698cb6b58a2ddbe"
7+ }
8+ ]
9+}143 bench-lua: ## Benchmark Lua execution (headless, CART=games/bench_stress.cyd FRAMES=500)
144 @mkdir -p tests/obj
145 @for f in $(LUA_SOURCES); do \
146- $(CC) -c -O2 -DLUA_32BITS=1 -I$(LUA_SRC) $$f -o tests/obj/$$(basename $$f .c).o; \
146+ $(CC) -c -O3 -DLUA_32BITS=1 -I$(LUA_SRC) $$f -o tests/obj/$$(basename $$f .c).o; \
147 done
148- @$(CXX) -std=c++17 -O2 -DLUA_32BITS=1 -Iemu/core -I$(LUA_SRC) \
148+ @$(CXX) -std=c++17 -O3 -DLUA_32BITS=1 -Iemu/core -I$(LUA_SRC) \
149 tests/test_bench_lua.cpp $(CORE_TEST_SOURCES) tests/obj/*.o \
150 -o tests/test_bench_lua && tests/test_bench_lua $(BENCH_CART) $(BENCH_FRAMES)
151
1 {"type":"config","name":"Optimize CYD-8 Lua execution speed","metricName":"total_us","metricUnit":"µs","bestDirection":"lower"}
2+{"run":1,"commit":"e4164e2","metric":301026,"metrics":{"update_us":221756,"draw_us":79331,"frames":500},"status":"keep","description":"Baseline: 500-frame bench_stress.cyd, ~301ms total, ~222ms update, ~79ms draw","timestamp":1776340284361,"segment":0,"confidence":null,"iterationTokens":199,"asi":{"hypothesis":"baseline measurement","split":"update=74% / draw=26%","per_frame_us":602}}
3+{"run":2,"commit":"e4164e2","metric":311078,"metrics":{"update_us":227553,"draw_us":79984,"frames":500},"status":"discard","description":"Cache _update/_draw refs via luaL_ref — slightly slower (311ms vs 301ms), noise","timestamp":1776340492038,"segment":0,"confidence":null,"iterationTokens":6393,"asi":{"hypothesis":"Cache _update/_draw function refs via luaL_ref to avoid global table lookup each frame","result":"No improvement, possibly due to luaL_ref overhead. Global lookup is already fast for short strings.","rollback_reason":"No improvement, within noise","next_action_hint":"Focus on Lua VM internals and build flags rather than API call overhead"}}