Skip to content

Commit

Permalink
Benchmark specializations: minor doc/usage changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Cholet committed Apr 16, 2024
1 parent 40e24dc commit 5f401bb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions benches/specializations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const NTH_INPUTS: &[usize] = &[0, 1, 2, 4, 8];
/// Each created group has functions with the following ids:
///
/// - `next`, `size_hint`, `count`, `last`, `nth`, `collect`, `fold`
/// - and when marked as `DoubleEndedIterator`: `next_back`, `rfold`
/// - and when marked as `DoubleEndedIterator`: `next_back`, `nth_back`, `rfold`
/// - and when marked as `ExactSizeIterator`: `len`
///
/// Note that this macro can be called only once.
Expand Down Expand Up @@ -135,8 +135,11 @@ macro_rules! bench_specializations {
};
}

// Example: To bench only `ZipLongest::fold`, you can do
// Usage examples:
// - For `ZipLongest::fold` only:
// cargo bench --bench specializations zip_longest/fold
// - For `.combinations(k).nth(8)`:
// cargo bench --bench specializations combinations./nth/8
bench_specializations! {
interleave {
{
Expand Down

0 comments on commit 5f401bb

Please sign in to comment.