[1196] string_to_scheme_tree 单元测试、性能测试与优化 - #4279
Open
da-liii wants to merge 2 commits into
Open
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
da-liii
force-pushed
the
da/1196/string_scheme
branch
2 times, most recently
from
August 10, 2026 02:04
3a339d5 to
2ede761
Compare
- glue: 暴露 string->stree 和 stree->string 到 Scheme - 单元测试: 116 个断言覆盖原子/列表/嵌套/quote/字符串/转义/注释/Unicode/数字/布尔值/边界 - 性能测试: 16 项基准,包含 before/after 对比 - 优化: 查表法字符分类(char_type[256] 替换 is_spc/is_paren_or_spc 多分支判断, skip_scheme_blanks 循环合并空白+注释检测为单次查表) 优化效果:深层嵌套提升 6.7%,长字符串提升 7.4%,无回退。 Co-Authored-By: Claude <noreply@anthropic.com>
da-liii
force-pushed
the
da/1196/string_scheme
branch
from
August 10, 2026 03:52
2ede761 to
9b0f407
Compare
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.
改动内容
glue 绑定
string->stree(调用 C++string_to_scheme_tree)和stree->string(调用 C++scheme_tree_to_string)单元测试(
TeXmacs/tests/1196.scm)116 个断言覆盖:
\\,\",\n,\t,\0)#t/#f)性能测试
16 项基准覆盖简单/中等/大型/深层嵌套/宽列表/长字符串/混合结构
性能优化
char_type[256]替换分支繁多的is_spc/is_paren_or_spcunslash🤖 Generated with Claude Code