rust/crates
bors[bot] 1afdc57929
Merge #4489
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>
2020-05-16 23:06:23 +00:00
..
ra_arena Extract messy tree handling out of profiling code 2020-04-25 21:22:40 +02:00
ra_assists Merge #4273 2020-05-14 14:29:22 +00:00
ra_cfg Move feature desugaring to the right abstraction layer 2020-05-08 02:56:53 +02:00
ra_db Expand fixture documentation a little 2020-05-10 16:51:12 +02:00
ra_flycheck Cleanups 2020-05-15 02:09:30 +02:00
ra_fmt Introduce EffectExpr 2020-05-02 11:21:39 +02:00
ra_hir Add doc comment for resolve_hir_path_qualifier 2020-05-16 20:40:58 +01:00
ra_hir_def Handle Self in values and patterns 2020-05-15 17:25:28 +02:00
ra_hir_expand Store proc-macro result in salsa db 2020-05-14 17:57:51 +08:00
ra_hir_ty Allow calling dyn trait super trait methods without the super trait in scope 2020-05-16 18:37:05 +02:00
ra_ide Merge #4472 2020-05-16 19:49:01 +00:00
ra_ide_db New definition_visibility method 2020-05-11 14:28:14 +03:00
ra_mbe Reuse Vec allocations 2020-05-16 22:20:44 +02:00
ra_parser Shrink ra_parser::Event from 32 bytes to 16 bytes 2020-05-16 22:20:44 +02:00
ra_proc_macro proc_macro: add ability to log to stderr and view output in vscode 2020-04-23 01:57:02 +03:00
ra_proc_macro_srv Remove dbg 2020-05-10 06:39:36 +08:00
ra_prof Simplify profiler impl (bubble up Option and shorten code 2020-04-26 00:55:49 +03:00
ra_project_model Make some stuff public so that they can be reused by other tools 2020-05-14 11:14:46 +02:00
ra_syntax Shrink ra_parser::Event from 32 bytes to 16 bytes 2020-05-16 22:20:44 +02:00
ra_text_edit Make some stuff public so that they can be reused by other tools 2020-05-14 11:14:46 +02:00
ra_toolchain Simplify match 2020-05-09 22:20:11 +03:00
ra_tt Reduce reallocations in ra_tt::buffer::TokenBuffer::new_inner 2020-05-16 22:20:44 +02:00
rust-analyzer Merge #4448 2020-05-15 14:29:01 +00:00
stdx Move snake case method to heck 2020-05-03 21:35:21 +03:00
test_utils unindent -> dedent 2020-05-09 14:48:43 +02:00