diff --git a/pyo3-benches/benches/bench_gil.rs b/pyo3-benches/benches/bench_gil.rs index e25345e1..169c7c6c 100644 --- a/pyo3-benches/benches/bench_gil.rs +++ b/pyo3-benches/benches/bench_gil.rs @@ -1,14 +1,6 @@ use codspeed_criterion_compat::{criterion_group, criterion_main, BatchSize, Bencher, Criterion}; -use pyo3::{prelude::*, GILPool}; - -fn bench_clean_gilpool_new(b: &mut Bencher<'_>) { - Python::with_gil(|_py| { - b.iter(|| { - let _ = unsafe { GILPool::new() }; - }); - }); -} +use pyo3::prelude::*; fn bench_clean_acquire_gil(b: &mut Bencher<'_>) { // Acquiring first GIL will also create a "clean" GILPool, so this measures the Python overhead. @@ -28,7 +20,6 @@ fn bench_dirty_acquire_gil(b: &mut Bencher<'_>) { } fn criterion_benchmark(c: &mut Criterion) { - c.bench_function("clean_gilpool_new", bench_clean_gilpool_new); c.bench_function("clean_acquire_gil", bench_clean_acquire_gil); c.bench_function("dirty_acquire_gil", bench_dirty_acquire_gil); }