diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2020-06-29 18:07:52 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2020-06-29 18:07:52 +0300 |
| commit | 95d67ec40174ec1c344ab39eee414d7a41a36af0 (patch) | |
| tree | 43f713aef65a1439b960b1d199863dc1c29a1994 /docs/dev | |
| parent | 82ce5792ab70ab8d20a1afde72c5400c27b9c190 (diff) | |
| download | rust-95d67ec40174ec1c344ab39eee414d7a41a36af0.tar.gz rust-95d67ec40174ec1c344ab39eee414d7a41a36af0.zip | |
Use more of FxHash*
Diffstat (limited to 'docs/dev')
| -rw-r--r-- | docs/dev/README.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md index 11dc5261b60..6b6824ded1c 100644 --- a/docs/dev/README.md +++ b/docs/dev/README.md @@ -254,6 +254,11 @@ The default name is a lowercased name of the type: `global_state: GlobalState`. Avoid ad-hoc acronyms and contractions, but use the ones that exist consistently (`db`, `ctx`, `acc`). The default name for "result of the function" local variable is `res`. +## Collection types + +We prefer `rustc_hash::FxHashMap` and `rustc_hash::FxHashSet` instead of the ones in `std::collections`. +They use a hasher that's slightly faster and using them consistently will reduce code size by some small amount. + ## Preconditions Function preconditions should generally be expressed in types and provided by the caller (rather than checked by callee): |
