From 95d67ec40174ec1c344ab39eee414d7a41a36af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 29 Jun 2020 18:07:52 +0300 Subject: Use more of FxHash* --- docs/dev/README.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/dev') diff --git a/docs/dev/README.md b/docs/dev/README.md index 11dc5261b..6b6824ded 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): -- cgit v1.2.3