chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

69
vendor/base16ct/benches/mod.rs vendored Normal file
View File

@@ -0,0 +1,69 @@
#![feature(test)]
extern crate test;
use test::{black_box, Bencher};
#[bench]
fn decode_lower(b: &mut Bencher) {
let input = vec![b'1'; 1 << 14];
let mut buf = vec![0u8; 1 << 13];
b.iter(|| {
let input = black_box(&input[..]);
let res = base16ct::lower::decode(input, &mut buf).unwrap();
black_box(res);
});
b.bytes = input.len() as u64;
}
#[bench]
fn decode_upper(b: &mut Bencher) {
let input = vec![b'1'; 1 << 14];
let mut buf = vec![0u8; 1 << 13];
b.iter(|| {
let input = black_box(&input[..]);
let res = base16ct::upper::decode(input, &mut buf).unwrap();
black_box(res);
});
b.bytes = input.len() as u64;
}
#[bench]
fn decode_mixed(b: &mut Bencher) {
let input = vec![b'1'; 1 << 14];
let mut buf = vec![0u8; 1 << 13];
b.iter(|| {
let input = black_box(&input[..]);
let res = base16ct::mixed::decode(input, &mut buf).unwrap();
black_box(res);
});
b.bytes = input.len() as u64;
}
#[bench]
fn encode_lower(b: &mut Bencher) {
let input = vec![0x42; 1 << 14];
let mut buf = vec![0u8; 1 << 15];
b.iter(|| {
let input = black_box(&input[..]);
let res = base16ct::lower::encode(input, &mut buf).unwrap();
black_box(res);
});
b.bytes = input.len() as u64;
}
#[bench]
fn encode_upper(b: &mut Bencher) {
let input = vec![0x42; 1 << 14];
let mut buf = vec![0u8; 1 << 15];
b.iter(|| {
let input = black_box(&input[..]);
let res = base16ct::upper::encode(input, &mut buf).unwrap();
black_box(res);
});
b.bytes = input.len() as u64;
}