Remove unnecessary allocations
This commit is contained in:
@@ -51,7 +51,8 @@ fn criterion_benchmark(criterion: &mut Criterion) {
|
||||
weights.push(vec![vec![1.0], vec![1.0]]);
|
||||
}
|
||||
|
||||
let mut batch = Batch::new(composition, results, weights, 1, P_DRAW, &agents);
|
||||
let mut batch = Batch::new(1, P_DRAW);
|
||||
batch.add_events(composition, results, weights, &agents);
|
||||
|
||||
criterion.bench_function("Batch::iteration", |b| {
|
||||
b.iter(|| batch.iteration(0, &agents))
|
||||
|
||||
Reference in New Issue
Block a user