Skip to content

Refactor/remove runtime dispatch - #18

Merged
jcfangc merged 9 commits into
mainfrom
refactor/remove-runtime-dispatch
Aug 1, 2026
Merged

Refactor/remove runtime dispatch#18
jcfangc merged 9 commits into
mainfrom
refactor/remove-runtime-dispatch

Conversation

@jcfangc

@jcfangc jcfangc commented Aug 1, 2026

Copy link
Copy Markdown
Owner

No description provided.

jcfangc added 7 commits August 1, 2026 12:53
Select SIMD backends entirely through compile-time target features, remove the CPUID cache and dispatch feature, and document native compilation. Preserve leading-zero performance with short-string and AVX2 all-zero scan optimizations.
Match the AVX2 forward scanner with a four-vector reverse scan, add two-word fast paths for owned and aligned borrowed strings, and group leading/trailing benchmark references by comparable cases.
Route BitString matches-at and suffix stripping through BitStr alignment-aware entry points. Add regression coverage for multi-word patterns at unaligned offsets and oversized suffixes.
Define true alignment consts as caller guarantees, enforce them with debug assertions, and cover matching, equality, ordering, and hashing across word-boundary lengths and all alignment combinations.
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 73.83178% with 56 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ords_scan/funcs_for_ends/funcs_for_leading_core.rs 27.50% 29 Missing ⚠️
...rds_scan/funcs_for_ends/funcs_for_trailing_core.rs 28.94% 27 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Aug 1, 2026

Copy link
Copy Markdown

Merging this PR will regress 5 benchmarks

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 82 improved benchmarks
❌ 5 regressed benchmarks
✅ 101 untouched benchmarks
🆕 39 new benchmarks
⏩ 210 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
from_bool_iter/len_65536/ours_string 78.6 µs 126.3 µs -37.8%
matches_at_str/len_65/no/unaligned/ours_string_str 403.1 ns 490.3 ns -17.79%
matches_at_str/len_65/yes/unaligned/ours_string_str 403.1 ns 490.3 ns -17.79%
matches_at_str/len_65/no/aligned/ours_string_str 429.4 ns 516.9 ns -16.93%
matches_at_str/len_65/yes/aligned/ours_string_str 429.4 ns 516.9 ns -16.93%
ends_with/len_65536/miss/ours_string_string 1,357.2 ns 442.2 ns ×3.1
starts_with/len_65536/miss/ours_string_string 1,320 ns 436.9 ns ×3
leading_zeros/len_65/all_zeros/ours_string 553.6 ns 183.6 ns ×3
leading_zeros/unaligned_63/len_4096/all_zeros/ours_str 1,536.9 ns 822.2 ns +86.93%
starts_with/len_65536/miss/ours_str_string 741.7 ns 438.6 ns +69.09%
ends_with/len_65536/miss/ours_str_str 747.5 ns 443.3 ns +68.61%
starts_with/len_65536/miss/ours_str_str 830.6 ns 527.5 ns +57.45%
find_str/len_65/front/ours_string_string 1,141.7 ns 725.8 ns +57.29%
ends_with/len_65536/miss/ours_str_string 688.6 ns 442.8 ns +55.52%
ends_with/len_65536/miss/ours_string_str 688.6 ns 442.8 ns +55.52%
starts_with/len_65536/miss/ours_string_str 711.9 ns 467.2 ns +52.38%
find_str/len_65/front/ours_string_str 1,200.6 ns 789.2 ns +52.13%
ends_with/len_65536/hit/ours_str_str 719.4 ns 473.3 ns +52%
find_str/len_65/miss/ours_string_str 1,183.6 ns 784.4 ns +50.89%
find_str/len_65/miss/ours_string_string 1,124.7 ns 752.2 ns +49.52%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing refactor/remove-runtime-dispatch (29ec1c2) with main (fe4564c)

Open in CodSpeed

Footnotes

  1. 210 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.

@jcfangc
jcfangc merged commit fb56862 into main Aug 1, 2026
6 of 7 checks passed
@jcfangc
jcfangc deleted the refactor/remove-runtime-dispatch branch August 1, 2026 14:45
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.

2 participants