This PR adds a micro-benchmark that measures the cost of validating many tracked structs that are all unaffected by the input change.
The benchmark is emulating a scenario where a root query creates a large number of tracked structs, e.g., a program.check call. Now, a single file changes that invalidates a very small subset of ingredients, but program.check still pays the cost of marking unchanged ingredients as "validated".
This PR adds a micro-benchmark that measures the cost of validating many tracked structs that are all unaffected by the input change.
The benchmark is emulating a scenario where a root query creates a large number of tracked structs, e.g., a
program.check
call. Now, a single file changes that invalidates a very small subset of ingredients, butprogram.check
still pays the cost of marking unchanged ingredients as "validated".Testing
I back-ported the benchmark to before beautiful Salsa. See https://github.com/salsa-rs/salsa/pull/530.
Running the benchmark on the current version takes around 14us whereas the pre-rewrite version only takes 12us on my machine.
This benchmark covers https://salsa.zulipchat.com/#narrow/stream/333573-salsa-3.2E0/topic/Beautiful.20Salsa.20perf.20incremental.20checking.20perf.20regression