]> git.lizzy.rs Git - rust.git/commit
Restore HashMap performance by allowing some functions to be inlined
authorBjörn Steinbrink <bsteinbr@gmail.com>
Sun, 3 May 2015 12:02:25 +0000 (14:02 +0200)
committerBjörn Steinbrink <bsteinbr@gmail.com>
Sun, 3 May 2015 12:08:30 +0000 (14:08 +0200)
commitf4176b52d3817b93570a73e2768736276d76ebf5
tree5a8603ba1ca1daa77203d10f42522dc26a8eb6a2
parent0d7d3ec9d2b314af0188a820c58fbd95ee905793
Restore HashMap performance by allowing some functions to be inlined

Since the hashmap and its hasher are implemented in different crates, we
currently can't benefit from inlining, which means that especially for
small, fixed size keys, there is a huge overhead in hash calculations,
because the compiler can't apply optimizations that only apply for these
keys.

Fixes the brainfuck benchmark in #24014.
src/libcore/hash/sip.rs
src/libstd/collections/hash/map.rs