Closed kpreid closed 4 months ago
The above data was collected by running all benchmarks only once. On re-testing, it seems that a lot of the apparent losses (and gains) may have been noise. Sigh.
5c90bca42869f764931d53622ce2939f284fd6e1 puts in the rest of the inlining. In the end, I couldn't find any consistent regression.
In commit 45a772df73582609cbeb57d69397122bff72db94 I split the
math
andraycast
code into a new library crate,all-is-cubes-base
. Unfortunately, I didn’t think at the time about the effect this would have on function inlining.rustc
currently has a heuristic for marking small functions inlinable, but it doesn't seem to suffice. After a slapdash addition of#[inline]
where it seemed like it would make sense, I get the following notable results in benchmarks:space
space-bulk-mutation/*
space
GridAab/iter_for_each
save
load
mesh
block/*
raytrace
threaded/*
mesh
space/*
block
evaluate/*
raycast
many steps *
Benchmarks run on my laptop have quite unstable results, but these are huge differences which I am confident are significant. But since they are differences in both directions, we need to break down the
#[inline]
changes into smaller units to determine what's actually improving performance and what's making it worse.