helpers4 0.0.6

General-purpose Rust helpers, one crate, one feature per module (string, array, ...)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// This file is part of helpers4.
// Copyright (C) 2025 baxyz
// SPDX-License-Identifier: LGPL-3.0-or-later

use criterion::Criterion;
use helpers4::hex::decode;
use std::hint::black_box;

pub fn bench(c: &mut Criterion) {
    let hex = "a5".repeat(32);
    c.bench_function("hex::decode", |b| b.iter(|| decode(black_box(&hex))));
}