Skip to content

[0025] 优化 vector-filter 性能#786

Merged
da-liii merged 3 commits into
mainfrom
da/0025/other
May 11, 2026
Merged

[0025] 优化 vector-filter 性能#786
da-liii merged 3 commits into
mainfrom
da/0025/other

Conversation

@da-liii
Copy link
Copy Markdown
Contributor

@da-liii da-liii commented May 11, 2026

Summary

  • 新增 bench/vector-filter.scm 性能基准测试
  • 优化 vector-filter 实现:使用 vector-fold-right + list->vector 替代 vector-fold + length + 反向 vector-set!
  • 性能提升约 20~30%
  • 补充 devel/0025.md 任务文档

Test plan

  • bin/gf tests/liii/vector/vector-filter-test.scm 通过
  • bin/gf bench/vector-filter.scm 性能基准测试

🤖 Generated with Claude Code

da-liii and others added 3 commits May 11, 2026 16:34
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
使用 vector-fold-right + list->vector 替代 vector-fold + length + 反向 vector-set!,
避免 Scheme 层的长度计算和反向填充循环,性能提升约 20~30%。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@da-liii da-liii merged commit 6b35baf into main May 11, 2026
4 checks passed
@da-liii da-liii deleted the da/0025/other branch May 11, 2026 08:42
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