rust/crates/hir_expand/src
bors[bot] fe4a94fff3
Merge #7994
7994: Speed up mbe matching in heavy recursive cases r=edwin0cheng a=edwin0cheng

In some cases (e.g.  #4186), mbe matching is very slow due to a lot of copy and allocation for bindings, this PR try to solve this problem by introduce a semi "link-list" approach for bindings building.

I used this [test case](https://github.com/weiznich/minimal_example_for_rust_81262) (for `features(32-column-tables)`) to run following command to benchmark:
```
time rust-analyzer analysis-stats  --load-output-dirs ./ 
```

Before this PR : 2 mins
After this PR: 3 seconds.

However, for 64-column-tables cases, we still need 4 mins to complete. 

I will try to investigate in the following weeks.

bors r+




Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-13 13:04:45 +00:00
..
ast_id_map.rs add more counts 2021-01-27 12:16:24 +03:00
builtin_derive.rs Use expect-test for builtin macro/derive tests 2021-03-10 21:05:02 +01:00
builtin_macro.rs Use expect-test for builtin macro/derive tests 2021-03-10 21:05:02 +01:00
db.rs add expand log 2021-03-13 20:14:21 +08:00
diagnostics.rs Explain how we get precise spans for diagnostics. 2020-11-28 18:14:08 +03:00
eager.rs Fixed nested eager macro bug 2021-01-03 17:56:59 +08:00
hygiene.rs shrink_to_fit TokenMap's backing storage 2021-01-18 18:40:06 +01:00
lib.rs Remove useless wrapper 2021-01-15 20:15:33 +03:00
name.rs Implement builtin cfg! macro 2021-03-10 19:43:03 +01:00
proc_macro.rs Swap assert_eq_text\!(expected, actual) 2021-01-16 13:30:26 +09:00
quote.rs Implement builtin cfg! macro 2021-03-10 19:43:03 +01:00
test_db.rs Introduce anchored_path 2020-12-09 19:07:05 +03:00