file structure
This commit is contained in:
@@ -25,7 +25,7 @@ fn voxel_vec_3d(data: Vec<Vec<Vec<Voxel>>>) -> Voxel {
|
||||
return data[X][Y][Z];
|
||||
}
|
||||
|
||||
fn criterion_benchmark(c: &mut Criterion) {
|
||||
fn voxel_map_benchmark(c: &mut Criterion) {
|
||||
let vec_1d = vec![Voxel { r: 0, g: 0, b: 0 }; MAP_WIDTH * MAP_HEIGHT * MAP_DEPTH];
|
||||
let vec_3d = vec![vec![vec![Voxel { r: 0, g: 0, b: 0 }; MAP_DEPTH]; MAP_HEIGHT]; MAP_WIDTH];
|
||||
|
||||
@@ -33,5 +33,5 @@ fn criterion_benchmark(c: &mut Criterion) {
|
||||
c.bench_function("voxels in 3d vector", |b| b.iter(|| voxel_vec_3d(black_box(vec_3d.clone()))));
|
||||
}
|
||||
|
||||
criterion_group!(benches, criterion_benchmark);
|
||||
criterion_group!(benches, voxel_map_benchmark);
|
||||
criterion_main!(benches);
|
||||
Reference in New Issue
Block a user