[1215] 优化 subtree 性能并补充 Doxygen 文档、单元测试与基准 - #4367
Merged
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
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.
What
优化
subtree(moebius/Kernel/Types/path.cpp)的性能,并补充 Doxygen 文档、单元测试与 nanobench 基准。Why
subtree是「path → 子树」的唯一入口,编辑/排版热路径上高频调用。原实现为递归、path 按值传参(引用计数原子操作)、每层N(t)与t[i]重复做 compound 检查。How
const path&- 每层单次is_compound+ 边界检查;顺带修正负索引会t[-1]` 越界的问题subtree/has_subtree/parent_subtree补充中文 Doxygen 注释path_bench.cpp(moebius nanobench),新增 subtree/parent_subtree 测试用例bench(releasedbg,ns/op,5 次取中位数)
moebius_tests/*16/16 通过。🤖 Generated with Claude Code