For simple_scene benchmark, regerenerate BVH periodically
This makes the results much more consistent run-to-run. I suspect the inconsistency was caused by random variations in the memory layout of the BVH.
This commit is contained in:
parent
ea311408ba
commit
5aad1242b3
|
|
@ -20,6 +20,7 @@ fn simple_scene(bencher: &mut Criterion) {
|
|||
let model_file_path =
|
||||
Path::new(env!("CARGO_MANIFEST_DIR")).join("test_data/stanford_bunny.obj");
|
||||
|
||||
bencher.bench_function("simple_scene", |b| {
|
||||
let scene = Scene {
|
||||
camera_location: Point3::new(-2.0, 1.0, -5.0),
|
||||
objects: vec![Box::new(BoundingVolumeHierarchy::build(
|
||||
|
|
@ -34,8 +35,6 @@ fn simple_scene(bencher: &mut Criterion) {
|
|||
.unwrap(),
|
||||
))],
|
||||
};
|
||||
|
||||
bencher.bench_function("simple_scene", |b| {
|
||||
b.iter(|| {
|
||||
let tile = Tile {
|
||||
start_column: 0,
|
||||
|
|
|
|||
Loading…
Reference in New Issue