-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.

Description
Just for fun, I tried changing
pub type FxHashMap<K, V> = HashMap<K, V, BuildHasherDefault<FxHasher>>;
to
pub type FxHashMap<K, V> = OrderMap<K, V, BuildHasherDefault<FxHasher>>;
Using the new compiler, compilation time of my crate went down from 28.24 seconds to 25.46 seconds. I didn't do any further benchmarks yet, but the results seem promising. Looks like we could easily shave 5-10% from compilation time simply by changing the hash map implementation.
I was wondering if anyone else considered doing the same, and whether this is something I should experiment with further? What do you think?
cc @bluss
bluss, kennytm, quininer, jonas-schievink, killercup and 2 more
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.