Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support free-threaded Python #165

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
fix benches
  • Loading branch information
davidhewitt committed Nov 19, 2024
commit 9bf932afa66c14c0a59fa35faaa6ee22b69de336
6 changes: 3 additions & 3 deletions crates/jiter/benches/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use jiter::{cache_clear, PythonParse, StringCacheMode};

fn python_parse_numeric(bench: &mut Bencher) {
Python::with_gil(|py| {
cache_clear(py);
cache_clear();
bench.iter(|| {
PythonParse::default()
.python_parse(
Expand All @@ -23,7 +23,7 @@ fn python_parse_numeric(bench: &mut Bencher) {

fn python_parse_other(bench: &mut Bencher) {
Python::with_gil(|py| {
cache_clear(py);
cache_clear();
bench.iter(|| {
PythonParse::default()
.python_parse(py, br#"["string", true, false, null]"#)
Expand All @@ -39,7 +39,7 @@ fn _python_parse_file(path: &str, bench: &mut Bencher, cache_mode: StringCacheMo
let json_data = contents.as_bytes();

Python::with_gil(|py| {
cache_clear(py);
cache_clear();
bench.iter(|| {
PythonParse {
cache_mode,
Expand Down