Skip to content

Commit

Permalink
Create, not open
Browse files Browse the repository at this point in the history
  • Loading branch information
Oppen committed Mar 10, 2023
1 parent e41bfc7 commit 2898777
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions bench/iai_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ macro_rules! iai_bench_expand_prog {
stringify!($val),
".json"
));
let (runner, mut _vm) =
let (runner, mut vm) =
cairo_run(black_box(program), &cairo_run_config, &mut hint_executor)
.expect("cairo_run failed");

let trace_file = File::open("/dev/null").expect("open trace file");
let trace_file = File::create("/dev/null").expect("open trace file");
let mut trace_writer = FileWriter::new(BufWriter::new(trace_file));
let relocated_trace = runner.relocated_trace.as_ref().expect("relocation failed");
write_encoded_trace(
Expand All @@ -78,21 +78,17 @@ macro_rules! iai_bench_expand_prog {
.expect("writing execution trace failed");
trace_writer.flush().expect("flush trace");

/*
let memory_file = File::open("/dev/null").expect("open memory file");
let memory_file = File::create("/dev/null").expect("open memory file");
let mut memory_writer = FileWriter::new(BufWriter::new(memory_file));
write_encoded_memory(
black_box(&runner.relocated_memory),
black_box(&mut memory_writer),
)
.expect("writing relocated memory failed");
memory_writer.flush().expect("flush memory");
*/

/*
vm.write_output(black_box(&mut String::new()))
.expect("writing output failed");
*/
}
};
}
Expand Down

1 comment on commit 2898777

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.30.

Benchmark suite Current: 2898777 Previous: ae6c562 Ratio
cairo_run(cairo_programs/benchmarks/fibonacci_1000_multirun.json) 152271483 ns/iter (± 417893) 114495207 ns/iter (± 853891) 1.33
cairo_run(cairo_programs/benchmarks/linear_search.json) 119004037 ns/iter (± 439126) 90384261 ns/iter (± 804447) 1.32

This comment was automatically generated by workflow using github-action-benchmark.

CC: @unbalancedparentheses

Please sign in to comment.