perf: avoid concat scratch string interning#126
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PROFILE_REPEAT=Nsupport to hotspot, opcode, and GC profiling runners for short workload telemetrygc_pressure,mandelbrot_long, andtable_hash_pressurein the dashboard workload registryOP_MULspikesEvidence
Correctness:
make testpassed, including 44/44 official Lua conformance testsBenchmarks, Apple M3 Max, best-of-N vs Lua 5.4.7 reference:
table_hash_pressure1.17x after the concat fast path (harness/bench/results/20260602T183040Z-98bd6bd-compare.tsv)table_hash_pressure1.14x, overall 1.54x (harness/bench/results/20260602T183215Z-98bd6bd-compare.tsv)Profile delta:
table_hash_pressure_x100hadlua_vm::vm::concatat 1,297 samples / 19.4% (harness/bench/profiles/20260602T182714Z-98bd6bd-table_hash_pressure_x100/summary.txt)lua_vm::vm::concatdropped to 116 samples / 3.1% (harness/bench/profiles/20260602T183359Z-98bd6bd-table_hash_pressure_x100/summary.txt)Negative results recorded in docs:
ci_trapguard looked plausible but regressedbinarytreesin isolationOP_MULshape worsenedmandelbrot_long, so it was droppedValidation
make testbash -n harness/bench/profile-hotspots.shbash -n harness/bench/opcode-profile.shbash -n harness/bench/gc-profile.shpython3 -m py_compile harness/bench/history.py harness/bench/vm-execute-attribution.pyPROFILE_REPEAT=2 bash harness/bench/gc-profile.sh gc_pressurePROFILE_REPEAT=2 bash harness/bench/opcode-profile.sh table_hash_pressurepython3 harness/bench/history.py --out-dir /tmp/lua-rs-history-check