Streamline CrateMetadataRef construction in provide_one!.#155628
Streamline CrateMetadataRef construction in provide_one!.#155628nnethercote wants to merge 1 commit intorust-lang:mainfrom
CrateMetadataRef construction in provide_one!.#155628Conversation
`cstore.get_crate_data()` creates a `CrateMetadataRef`, which is exactly what we need. The current code is very confused and does several unnecessary things: mapping the `FreezeReadGuard` and calling `CStore::from_tcx` a second time to construct a second `CrateMetadataRef`. This is a small perf win.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Streamline `CrateMetadataRef` construction in `provide_one!`.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (58e1a01): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -9.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 489.594s -> 490.743s (0.23%) |
|
Perf results show small but clear perf wins, mostly for |
|
Cool! @bors r+ |
|
Somehow I didn't see your approval at all mu001999. Let me give credit back to you. @bors r=mu001999 |
|
Three approvals so far! It's a popular PR 😄 |
cstore.get_crate_data()creates aCrateMetadataRef, which is exactly what we need. The current code is very confused and does several unnecessary things: mapping theFreezeReadGuardand callingCStore::from_tcxa second time to construct a secondCrateMetadataRef.This is a small perf win.
r? @mu001999