1afdc57929
4489: Memory allocation optimization r=matklad a=simonvandel I did some profiling using DHAT, and this was what I could easily optimize without much knowledge of the codebase. This speeds up analysis-stats on rust-analyser by ~4% on my local machine. **Benchmark** ➜ rust-analyzer-base git:(master) hyperfine --min-runs=2 '/home/simon/Documents/rust-analyzer/target/release/rust-analyzer analysis-stats .' '/home/simon/Documents/rust-analyzer-base/target/release/rust-analyzer analysis-stats .' Benchmark #1: /home/simon/Documents/rust-analyzer/target/release/rust-analyzer analysis-stats . Time (mean ± σ): 49.621 s ± 0.317 s [User: 48.725 s, System: 0.792 s] Range (min … max): 49.397 s … 49.846 s 2 runs Benchmark #2: /home/simon/Documents/rust-analyzer-base/target/release/rust-analyzer analysis-stats . Time (mean ± σ): 51.764 s ± 0.045 s [User: 50.882 s, System: 0.756 s] Range (min … max): 51.733 s … 51.796 s 2 runs Summary '/home/simon/Documents/rust-analyzer/target/release/rust-analyzer analysis-stats .' ran 1.04 ± 0.01 times faster than '/home/simon/Documents/rust-analyzer-base/target/release/rust-analyzer analysis-stats .' Co-authored-by: Simon Vandel Sillesen <simon.vandel@gmail.com> |
||
---|---|---|
.. | ||
ra_arena | ||
ra_assists | ||
ra_cfg | ||
ra_db | ||
ra_flycheck | ||
ra_fmt | ||
ra_hir | ||
ra_hir_def | ||
ra_hir_expand | ||
ra_hir_ty | ||
ra_ide | ||
ra_ide_db | ||
ra_mbe | ||
ra_parser | ||
ra_proc_macro | ||
ra_proc_macro_srv | ||
ra_prof | ||
ra_project_model | ||
ra_syntax | ||
ra_text_edit | ||
ra_toolchain | ||
ra_tt | ||
rust-analyzer | ||
stdx | ||
test_utils |