Closed deeprobin closed 2 years ago
See CI failures
@mooman219 Please re-run the CI :)
@mooman219 Checks passed 👍🏼
The functions marked as const are used during font loading. The benchmarks you provided show a performance regression after the const changes load/fontdue
.
The functions marked as const are used during font loading. The benchmarks you provided show a performance regression after the const changes
load/fontdue
.
Weird. const
only ensures that the compiler tries to evaluate the method in compile time, otherwise nothing else should happen.
In my opinion, there should be no regression. Possibly something went wrong with my benchmark. Maybe it would be useful if you or someone else provides a benchmark.
Being totally honest, +/- 10% between runs with unchanged code is like really common and is up to the alignment of the planets, your os scheduling, and whatever mood lto is in. It may just be that the functions are already being evaluated as const.
What is the current status of this :smile:?
It can't hurt, I'll merge it.
Have marked a few functions as
const
, if that is possible in the stable version.So this does not include functions that contain floating point arithmetic or a
mut
reference.criterion
BenchmarksBefore (Branch
master
)After (Branch
code-optimization
)Comparison