@@ -6,6 +6,8 @@ use libc::malloc;
66use rand:: random;
77
88fn immix_benchmark_multi_thread ( c : & mut Criterion ) {
9+ gc_disable_auto_collect ( ) ;
10+ set_evacuation ( false ) ;
911 bench_n_threads ( get_threads ( ) ) ( c) ;
1012}
1113
@@ -27,6 +29,8 @@ fn bench_n_threads(n: usize) -> impl Fn(&mut Criterion) {
2729}
2830
2931fn immix_benchmark_single_thread ( c : & mut Criterion ) {
32+ gc_disable_auto_collect ( ) ;
33+ set_evacuation ( false ) ;
3034 c. bench_function (
3135 & format ! ( "singlethread gc benchmark--{} small objects" , OBJ_NUM ) ,
3236 |b| {
@@ -39,6 +43,8 @@ fn immix_benchmark_single_thread(c: &mut Criterion) {
3943}
4044
4145fn immix_benchmark_single_thread_mark ( c : & mut Criterion ) {
46+ gc_disable_auto_collect ( ) ;
47+ set_evacuation ( false ) ;
4248 c. bench_function (
4349 & format ! ( "singlethread gc mark benchmark--{} small objects" , OBJ_NUM ) ,
4450 |b| {
@@ -50,6 +56,8 @@ fn immix_benchmark_single_thread_mark(c: &mut Criterion) {
5056 ) ;
5157}
5258fn immix_benchmark_single_thread_sweep ( c : & mut Criterion ) {
59+ gc_disable_auto_collect ( ) ;
60+ set_evacuation ( false ) ;
5361 c. bench_function (
5462 & format ! ( "singlethread gc sweep benchmark--{} small objects" , OBJ_NUM ) ,
5563 |b| {
@@ -62,6 +70,8 @@ fn immix_benchmark_single_thread_sweep(c: &mut Criterion) {
6270}
6371
6472fn immix_benchmark_single_thread_alloc ( c : & mut Criterion ) {
73+ gc_disable_auto_collect ( ) ;
74+ set_evacuation ( false ) ;
6575 let mut g = c. benchmark_group ( "allocation bench" ) ;
6676 if option_env ! ( "PL_IMMIX_HEAP_SIZE" ) . is_none ( ) {
6777 return ;
0 commit comments