Repository navigation
feat(runtime): reuse codec allocations and KVSpace addresses - #364
Closed
carsontung666 wants to merge 4 commits into
Closed
carsontung666 wants to merge 4 commits into
carsontung666 wants to merge 4 commits into
Conversation
Closed
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.
Change
Reuse codec allocations and decoded instruction addresses in the default executor. Cached key references accelerate current KVSpace reads, result writes, and PC persistence; small input snapshots are released after each instruction. Preserve cache collision chains across calls/returns and remove redundant frame directory creation.
PC, status, operands, and frame values remain in KVSpace. Reject malformed None-shaped writes without deleting their destination or advancing PC.
Performance
Incremental comparison against previous PR head
ddac99aband SHM backend703797b9: all 10 repository workloads / 30 frozen scales, 9 alternating baseline/candidate/Python pairs (810 samples), matching outputs. Same Release CLI/layout/frontend, matched-O3backend flags and allocator, CPU 24, Xeon Gold 6418H, GCC 14.3, Python 3.10.12; fresh stores.Startup/layout and recursive frame work still dominate. This is not a large whole-command gain; Python algorithm timers remain about 85–1670x faster. All samples, medians, hashes, and reproduction command.
Validation
Full SHM and FS tutorials: each 222 passed, 0 failed, 1 extern/WIP skip (FS verified in CI). Runtime 11/11, SHM backend 7/7, frontend 2/2 CTests; 44 old/new frontend/backend compatibility checks. Clang ASan/UBSan runtime tests: 11/11, including malformed writes and live updates through a second handle. Fresh independent agent review passed, including 520 differential reference-write checks.
Native macOS runtime, layout, and runtime-rs builds passed on final head
69309ca; backend macOS build/tests passed ona10d60f.Write acceleration uses the optional API in kvspace #29 and kvspace-c #42; older libraries retain normal writes. Performance claims apply to SHM; FS receives correctness coverage, and Redis performance is untested.