Skip to content

Add benchmark variants for GH #461 performance investigation - #539

Merged
max-sixty merged 2 commits into
mainfrom
speed
Jan 11, 2026
Merged

max-sixty merged 2 commits into
mainfrom
speed

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Summary

  • Add three variants to real_repo_many_branches benchmark for wt select takes 15s #461 investigation:
    • warm: baseline with all branches (~15-18s)
    • warm_optimized: with skip_expensive_for_stale (~2-3s)
    • warm_worktrees_only: no branch enumeration (~600ms)
  • Document key performance insight in benches/CLAUDE.md: git for-each-ref %(ahead-behind:BASE) is O(commits) not O(refs)

Test plan

  • Benchmark compiles: cargo check --bench list
  • warm_optimized variant runs correctly (~2.9s mean)

🤖 Generated with Claude Code

max-sixty and others added 2 commits January 11, 2026 14:59
Add three variants to real_repo_many_branches benchmark:
- warm: baseline with all branches (~15-18s)
- warm_optimized: with skip_expensive_for_stale (~2-3s)
- warm_worktrees_only: no branch enumeration (~600ms)

Document key insight in benches/CLAUDE.md: git for-each-ref
%(ahead-behind:BASE) is O(commits) not O(refs) - it walks the
commit graph to compute divergence, taking ~2s on rust-lang/rust
regardless of ref count. Only way to avoid is skip branch enumeration.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit f80bdf2 into main Jan 11, 2026
@max-sixty
max-sixty deleted the speed branch January 11, 2026 23: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