Require a node registry to compile so the layout pass always runs

This commit is contained in:
Dennis Kobert
2026-08-15 14:49:25 +00:00
parent 87200f3c2a
commit 99ce2ea565
12 changed files with 19 additions and 18 deletions
@@ -6,10 +6,11 @@ use graph_craft::util::DEMO_ART;
fn compile_to_proto(c: &mut Criterion) {
use graph_craft::util::{compile, load_from_name};
let mut c = c.benchmark_group("Compile Network cold");
let registry = &interpreted_executor::node_registry::NODE_REGISTRY;
for name in DEMO_ART {
let network = load_from_name(name);
c.bench_function(name, |b| b.iter_batched(|| network.clone(), |network| compile(black_box(network)), criterion::BatchSize::SmallInput));
c.bench_function(name, |b| b.iter_batched(|| network.clone(), |network| compile(black_box(network), registry), criterion::BatchSize::SmallInput));
}
}
@@ -5,7 +5,7 @@ use gungraun::prelude::*;
#[library_benchmark]
#[benches::with_setup(args = ["isometric-fountain", "painted-dreams", "procedural-string-lights", "parametric-dunescape", "red-dress", "valley-of-spires"], setup = load_from_name)]
pub fn compile_to_proto(_input: NodeNetwork) {
std::hint::black_box(compile(_input));
std::hint::black_box(compile(_input, &interpreted_executor::node_registry::NODE_REGISTRY));
}
library_benchmark_group!(name = compile_group; benchmarks = compile_to_proto);