Repository navigation
perf: shrink RelocationKindInfo struct size - #2603
Conversation
|
In my environment, the wall time was almost the same as the current main. However, looking at the results from your |
|
For zed-release I see a 1.81% +/- 0.42% reduction in wall time. For clang-release, the speedup is smaller at 0.22% +/- 0.07%. Although if I link clang-release with --threads=8 then I see a speedup of 1.07% +/- 0.07%. There's definitely something funny looking with Martin's benchmark. It looks like it was run without --no-fork, but has a very large percentage change in peak RSS which makes me think perhaps it's comparing a release-debug build with a release build. Rustc does codegen differently when debug info is enabled (spilling extra variables to the stack), so it's not recommended to do that. From a quick skim of the change, it seems like a change that makes sense to me and the benchmarks look worth it. |
|
For me with Clang without debug info benchmark, this is >1% improvement with 8 threads, and just a noise with all 32 threads. No RSS changes regardless if forking or not. |
Nice, thank you all for the collected numbers. Might be the case the RSS diff is an artifact caused by me comparing release build w/ and w/o a debug-info. |
Apparently, it's no caused by that - no that RSS of the parent Wild process is not much interesting to compare. With |
Opening as a draft as the PR will deserve a bit more polishing, but sending to get a feedback from others. I noticed
apply_relocationspends a lot of time copying theRelocationKindInfo(5xxmmregister move to stack memory) at the place where we track previous relocation. With the PR, the size got reduced from 80B to 32B. I can measure ~1.5 speed-up onclang.releasebenchmark with 8 threads and got following poop numbers:@davidlattimore @lapla-cogito can you please benchmark it a bit so that we have a better taste if it's worse doing the optimization.