From 034d4d084a398b3c673e3cc173c7580549e4b427 Mon Sep 17 00:00:00 2001 From: Joshua Yanovski Date: Sat, 2 Jul 2022 21:23:51 -0700 Subject: [PATCH] Temporary bench changes. --- world/benches/site2.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/world/benches/site2.rs b/world/benches/site2.rs index 52a99225dc..2f4619a881 100644 --- a/world/benches/site2.rs +++ b/world/benches/site2.rs @@ -225,7 +225,7 @@ impl Filler for NullCanvas { fn dungeon(c: &mut Criterion) { let pool = ThreadPoolBuilder::new().build().unwrap(); let (world, index) = World::generate( - /*230*/59686, + 230/*59686*/, WorldOpts { seed_elements: true, world_file: FileOpts::LoadAsset(DEFAULT_WORLD_MAP.into()), @@ -299,22 +299,26 @@ fn dungeon(c: &mut Criterion) { bench_group("generate_citadel", "render_citadel", Site::generate_citadel); c.bench_function("generate_chunk", |b| { - let chunk_pos = (world.sim().map_size_lg().chunks() >> 1).as_(); + // let chunk_pos = (world.sim().map_size_lg().chunks() >> 1).as_(); // let chunk_pos = Vec2::new(9500 / 32, 29042 / 32); // let chunk_pos = Vec2::new(26944 / 32, 26848 / 32); // let chunk_pos = Vec2::new(842, 839); // let chunk_pos = Vec2::new(24507/32, 20682/32); // let chunk_pos = Vec2::new(19638/32, 19621/32); + let chunk_pos = Vec2::new(21488/32, 13584/32); b.iter(|| { black_box(world.generate_chunk(index.as_index_ref(), chunk_pos, || false, None)); }); }); c.bench_function("deserialize_chunk", |b| { - let chunk_pos = (world.sim().map_size_lg().chunks() >> 1).as_(); + // let chunk_pos = (world.sim().map_size_lg().chunks() >> 1).as_(); // let chunk_pos = Vec2::new(9500 / 32, 29042 / 32); // let chunk_pos = Vec2::new(26944 / 32, 26848 / 32); // let chunk_pos = Vec2::new(842, 839); + // let chunk_pos = Vec2::new(24507/32, 20682/32); + // let chunk_pos = Vec2::new(19638/32, 19621/32); + let chunk_pos = Vec2::new(21488/32, 13584/32); let chunk = world.generate_chunk(index.as_index_ref(), chunk_pos, || false, None).unwrap().0; /* println!("{:?}", chunk.sub_chunks_len()); let chunk = chunk.sub_chunks().next().unwrap(); */