Skip to content

feat(criterion-compat): add iter_manual to have finer control over the iteration loop#180

Merged
GuillaumeLagrange merged 3 commits into
mainfrom
cod-2677-add-a-custom-iter-in-codspeed-criterion-to-support-custom
May 22, 2026
Merged

feat(criterion-compat): add iter_manual to have finer control over the iteration loop#180
GuillaumeLagrange merged 3 commits into
mainfrom
cod-2677-add-a-custom-iter-in-codspeed-criterion-to-support-custom

Conversation

@GuillaumeLagrange
Copy link
Copy Markdown
Contributor

No description provided.

@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-2677-add-a-custom-iter-in-codspeed-criterion-to-support-custom branch from cbc4b7c to 59437f1 Compare May 20, 2026 10:17
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 20, 2026

Merging this PR will not alter performance

⚠️ 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

⚡ 15 improved benchmarks
❌ 9 regressed benchmarks
✅ 551 untouched benchmarks
🆕 8 new benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime iter_batched_large_input 8 ns 6 ns +33.33%
WallTime iter_batched_per_iteration 56 ns 46 ns +21.74%
WallTime iter_batched_ref_large_input 6 ns 5 ns +20%
WallTime slice_into_vec_with_bytes 54 ns 94 ns -42.55%
WallTime iterative[20] 41 ns 38 ns +7.89%
WallTime generate_combinations[5] 1.2 µs 1.5 µs -24.63%
WallTime add_two_integers[(65535, -65535)] 75 ns 89 ns -15.73%
WallTime graph_coloring[5] 1.1 µs 1.4 µs -21.92%
WallTime hamiltonian_cycle[5] 845 ns 920 ns -8.15%
WallTime add_two_integers[(255, 255)] 20 ns 6 ns ×3.3
WallTime iter_with_setup 60 ns 47 ns +27.66%
🆕 WallTime iter_manual_simple N/A 100.1 ms N/A
🆕 WallTime iter_manual_with_external_setup N/A 4.6 µs N/A
WallTime from_elem_decimal[1024] 85 ns 80 ns +6.25%
WallTime sum_fold 309 ns 322 ns -4.04%
WallTime bench_array1[42] 47 ns 179 ns -73.74%
WallTime fib_10 392 ns 419 ns -6.44%
Simulation process_items_with_counter 835.8 ns 865 ns -3.37%
🆕 Memory iter_manual_async N/A 0 B N/A
🆕 Memory iter_manual_simple N/A 0 B N/A
... ... ... ... ... ...

ℹ️ 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 cod-2677-add-a-custom-iter-in-codspeed-criterion-to-support-custom (e8a25a8) with main (6c54971)

Open in CodSpeed

@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-2677-add-a-custom-iter-in-codspeed-criterion-to-support-custom branch 3 times, most recently from 731c6b3 to 418a223 Compare May 20, 2026 12:31
Comment thread crates/criterion_compat/criterion_fork/src/codspeed_iter_manual.rs Outdated
Comment thread crates/criterion_compat/criterion_fork/src/codspeed_iter_manual.rs Outdated
Comment thread crates/criterion_compat/criterion_fork/src/codspeed_iter_manual.rs Outdated
Comment thread crates/criterion_compat/criterion_fork/src/codspeed_iter_manual.rs Outdated
Comment thread crates/criterion_compat/criterion_fork/src/codspeed_iter_manual.rs Outdated
Comment thread crates/criterion_compat/criterion_fork/src/codspeed_iter_manual.rs Outdated
Comment thread crates/criterion_compat/criterion_fork/src/routine.rs
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-2677-add-a-custom-iter-in-codspeed-criterion-to-support-custom branch 3 times, most recently from 0cbe33b to 4890db3 Compare May 22, 2026 12:43
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-2677-add-a-custom-iter-in-codspeed-criterion-to-support-custom branch from 4890db3 to e8a25a8 Compare May 22, 2026 16:55
Copy link
Copy Markdown
Member

@not-matthias not-matthias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread crates/criterion_compat/criterion_fork/src/routine.rs
@GuillaumeLagrange GuillaumeLagrange merged commit e8a25a8 into main May 22, 2026
45 of 46 checks passed
@GuillaumeLagrange GuillaumeLagrange deleted the cod-2677-add-a-custom-iter-in-codspeed-criterion-to-support-custom branch May 22, 2026 17:04
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