Skip to content

feat: 降低可恢复 native 执行开销 - #366

Closed
carsontung666 wants to merge 5 commits into
array2d:masterfrom
carsontung666:feat/shared-state-native
Closed

carsontung666 wants to merge 5 commits into
array2d:masterfrom
carsontung666:feat/shared-state-native

Conversation

@carsontung666

@carsontung666 carsontung666 commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

可选标量 RWIR native。默认解释器不变。

每条指令仍从 KVSpace 读 PC 和操作数,提交 redo,写回状态和 PC,再清 redo。缓存只存地址,且只开在有回边的函数上。PC、值、常量、递归帧留在 KVSpace。

Xeon Gold 6418H,GCC 14.3,CPython 3.10.12。中位毫秒,含 redo,不含编译、初始化、attach、报告。加速比 = before / after。

用例 before 原 AOT after fast-loop 加速比 Python
iops(200000) 17.726 8.091 2.19x 9.073
fib(18) 1.453 0.787 1.85x 0.514
nqueens(8) 1.507 0.839 1.80x 0.807

after 相对 Python:iops 1.12x,nqueens 0.96x,fib 0.65x。只覆盖 int64/bool 标量 SHM,固定映射,单写者。方法和原始数据见 fast.md。

864 次输出一致,108 组最终 KV 字节相同。七种模式各 149 项(32 次边界重启、24 次 SIGKILL),另有 49 次跨模式恢复。codec 在 GCC O3 与 Clang ASan/UBSan 下各 16,955,522 次比较通过。原 AOT 二进制不变。attach、初始化、报告,以及每条指令 Get 分配器在 owner 死亡时的原有失败,不在本次恢复范围内。

@carsontung666 carsontung666 changed the title feat: add recoverable scalar native execution experiment feat: compare recoverable native execution strategies Oct 8, 2026
@carsontung666 carsontung666 changed the title feat: compare recoverable native execution strategies feat: reduce recoverable native execution overhead Oct 8, 2026
@carsontung666 carsontung666 changed the title feat: reduce recoverable native execution overhead feat: 降低可恢复 native 执行开销 Oct 8, 2026
@carsontung666
carsontung666 deleted the feat/shared-state-native branch October 17, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant