diff options
author | Genny <gen@nyble.dev> | 2023-02-09 20:00:33 -0600 |
---|---|---|
committer | Genny <gen@nyble.dev> | 2023-02-09 20:00:33 -0600 |
commit | 85cfff4d4663f15c67b954eb9cf999147d5beba8 (patch) | |
tree | a0efef2bd6f49b21c940a7f35ef0c914374fca43 | |
parent | c2833c9b4f942c3071478b7dbedef0c099734772 (diff) | |
download | gifed-85cfff4d4663f15c67b954eb9cf999147d5beba8.tar.gz gifed-85cfff4d4663f15c67b954eb9cf999147d5beba8.zip |
no more criterion
-rw-r--r-- | gifed/Cargo.toml | 7 | ||||
-rw-r--r-- | gifed/benches/lzw_encode.rs | 23 |
2 files changed, 0 insertions, 30 deletions
diff --git a/gifed/Cargo.toml b/gifed/Cargo.toml index dec912f..c4f0870 100644 --- a/gifed/Cargo.toml +++ b/gifed/Cargo.toml @@ -7,12 +7,5 @@ license = "CC0-1.0" description = "Gif encoding and decoding with fine control" repository = "https://github.com/genuinebyte/gifed" -[dev-dependencies] -criterion = "0.3" - [dependencies] weezl = "0.1.5" - -[[bench]] -name = "lzw_encode" -harness = false \ No newline at end of file diff --git a/gifed/benches/lzw_encode.rs b/gifed/benches/lzw_encode.rs deleted file mode 100644 index 69ed275..0000000 --- a/gifed/benches/lzw_encode.rs +++ /dev/null @@ -1,23 +0,0 @@ -use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use gifed::LZW; -use rand::{thread_rng, Rng}; -use weezl::{encode::Encoder, BitOrder}; - -pub fn criterion_benchmark(c: &mut Criterion) { - let mut random = [0u8; 2048]; - thread_rng().fill(&mut random[..]); - - c.bench_function("lzw encode 255bytes", |b| { - b.iter(|| LZW::encode(8, black_box(&random))) - }); - c.bench_function("weezl encode 255bytes", |b| { - b.iter(|| { - Encoder::new(BitOrder::Msb, 8) - .encode(black_box(&random)) - .unwrap() - }) - }); -} - -criterion_group!(benches, criterion_benchmark); -criterion_main!(benches); |