File tree 2 files changed +7
-2
lines changed 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,11 @@ path = "src/main.rs"
61
61
[profile .dev .package ."*" ]
62
62
opt-level = 3
63
63
64
+ [profile .bench ]
65
+ lto = true
66
+ codegen-units = 1
67
+ opt-level = 3
68
+
64
69
[patch .crates-io ]
65
70
# REDOX START, Uncommment when you want to compile/check with redoxer
66
71
# # following patches are just waiting on a new version to be released to crates.io
@@ -69,4 +74,3 @@ opt-level = 3
69
74
# socket2 = { git = "https://github.com/alexcrichton/socket2-rs" }
70
75
# REDOX END
71
76
72
- [target .bench ]
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use rustpython_vm::Interpreter;
6
6
const NBODY : & str = include_str ! ( "./benchmarks/nbody.py" ) ;
7
7
const MANDELBROT : & str = include_str ! ( "./benchmarks/mandelbrot.py" ) ;
8
8
const PYSTONE : & str = include_str ! ( "./benchmarks/pystone.py" ) ;
9
+ const STRINGS : & str = include_str ! ( "./benchmarks/strings.py" ) ;
9
10
10
11
fn bench_cpython ( b : & mut Bencher , source : & str ) {
11
12
let gil = cpython:: Python :: acquire_gil ( ) ;
@@ -59,7 +60,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
59
60
benchmark_pystone ( c) ;
60
61
benchmark_file ( c, "nbody.py" , NBODY ) ;
61
62
benchmark_file ( c, "mandlebrot.py" , MANDELBROT ) ;
62
- benchmark_file ( c, "strings.py" , PYSTONE ) ;
63
+ benchmark_file ( c, "strings.py" , STRINGS ) ;
63
64
}
64
65
65
66
criterion_group ! ( benches, criterion_benchmark) ;
You can’t perform that action at this time.
0 commit comments