Skip to content

Feat/matching round2 - #10

Merged
jcfangc merged 8 commits into
mainfrom
feat/matching-round2
Jun 21, 2026
Merged

Feat/matching round2#10
jcfangc merged 8 commits into
mainfrom
feat/matching-round2

refactor: hoist zero-length checks to top of matching methods

5429390
Select commit
Loading
Failed to load commit list.
CodSpeed HQ / CodSpeed Performance Analysis succeeded Jun 21, 2026 in 0s

Performance Gate Passed

⚡ 7 improved benchmarks
✅ 85 untouched benchmarks
🆕 8 new benchmarks
⏩ 11 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
starts_with/len_65/yes/bit_string 495.3 ns 216.1 ns ×2.3
starts_with/len_65/no/bit_string 524.4 ns 245.3 ns ×2.1
ends_with/len_65/no/bit_string 562.8 ns 279.7 ns ×2
ends_with/len_65/yes/bit_string 562.8 ns 279.7 ns ×2
count_ones/len_65/alternating/bit_string 277.8 ns 248.6 ns +11.73%
count_ones/len_65/dense/bit_string 277.8 ns 248.6 ns +11.73%
count_ones/len_65/sparse/bit_string 277.8 ns 248.6 ns +11.73%
🆕 matches_at/len_65/no/aligned/bit_string N/A 338.3 ns N/A
🆕 matches_at/len_65/no/unaligned/bit_string N/A 341.1 ns N/A
🆕 matches_at/len_65/yes/aligned/bit_string N/A 338.3 ns N/A
🆕 matches_at/len_65/yes/unaligned/bit_string N/A 341.1 ns N/A
🆕 matches_at/len_65536/no/aligned/bit_string N/A 621.7 ns N/A
🆕 matches_at/len_65536/no/unaligned/bit_string N/A 656.7 ns N/A
🆕 matches_at/len_65536/yes/aligned/bit_string N/A 623.9 ns N/A
🆕 matches_at/len_65536/yes/unaligned/bit_string N/A 690.6 ns N/A

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing feat/matching-round2 (5429390) with main (defdf59)

Open in CodSpeed

Footnotes

  1. 11 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.