about summary refs log tree commit diff
path: root/benches/lzw_encode.rs
diff options
context:
space:
mode:
authorGenny <gen@nyble.dev>2021-11-21 18:35:57 -0600
committerGenny <gen@nyble.dev>2021-11-21 18:35:57 -0600
commit1de64a3818875947f7f1044b1d4cfdf271b04fd3 (patch)
tree3a5bfbb237d67832dfa1beeb3d28566173484b63 /benches/lzw_encode.rs
parentf35e18cb0531e7d6a3544560746d592aa47ed555 (diff)
downloadgifed-1de64a3818875947f7f1044b1d4cfdf271b04fd3.tar.gz
gifed-1de64a3818875947f7f1044b1d4cfdf271b04fd3.zip
Bring gifprobe into this repository
Diffstat (limited to 'benches/lzw_encode.rs')
-rw-r--r--benches/lzw_encode.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/benches/lzw_encode.rs b/benches/lzw_encode.rs
deleted file mode 100644
index 69ed275..0000000
--- a/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);