rust/src/libstd
Andrea Canciani 28cca28e62 Improve make_hash function
The `make_hash` function is used to prevent hashes of non-empty
buckets to collide with `EMPTY_HASH = 0u64`. Ideally this function
also preserve the uniform distribution of hashes and is cheap to
compute.

The new implementation reduces the input hash size by one bit, simply
by setting the most significant bit. This obviously prevent output
hashes to collide with `EMPTY_HASH` and guarantees that the uniform
distribution is preserved. Moreover, the new function is simpler (no
comparisons, just an OR) and (under the same assumptions as the old
function, i.e. only the least significant bit will contribute to the
bucket index) no additional collisions are caused.
2015-01-03 10:51:37 +01:00
..
collections Improve make_hash function 2015-01-03 10:51:37 +01:00
io auto merge of #20154 : P1start/rust/qualified-assoc-type-generics, r=nikomatsakis 2015-01-03 03:25:21 +00:00
num rollup merge of #20410: japaric/assoc-types 2015-01-02 13:51:50 -08:00
path rollup merge of #20410: japaric/assoc-types 2015-01-02 13:51:50 -08:00
prelude rollup merge of #20410: japaric/assoc-types 2015-01-02 13:51:50 -08:00
rand rollup merge of #20315: alexcrichton/std-sync 2015-01-02 09:19:00 -08:00
rt core: use assoc types in Deref[Mut] 2015-01-02 12:19:59 -05:00
sync rollup merge of #20410: japaric/assoc-types 2015-01-02 13:51:50 -08:00
sys auto merge of #20154 : P1start/rust/qualified-assoc-type-generics, r=nikomatsakis 2015-01-03 03:25:21 +00:00
thread_local rollup merge of #20354: alexcrichton/second-pass-thread_local 2015-01-02 09:19:45 -08:00
time std: Second pass stabilization of sync 2015-01-01 22:02:59 -08:00
ascii.rs std: Stabilize the prelude module 2015-01-02 08:54:06 -08:00
bitflags.rs rollup merge of #20273: alexcrichton/second-pass-comm 2015-01-02 09:15:54 -08:00
bool.rs std: Remove public bool,tuple,unit modules 2014-12-18 19:13:32 -08:00
c_str.rs rollup merge of #20410: japaric/assoc-types 2015-01-02 13:51:50 -08:00
c_vec.rs rollup merge of #20273: alexcrichton/second-pass-comm 2015-01-02 09:15:54 -08:00
dynamic_lib.rs std: Stabilize the prelude module 2015-01-02 08:54:06 -08:00
error.rs std: Stabilize the prelude module 2015-01-02 08:54:06 -08:00
failure.rs rollup merge of #20377: alexcrichton/issue-20352 2015-01-02 09:16:26 -08:00
fmt.rs std: Enforce Unicode in fmt::Writer 2015-01-01 22:04:46 -08:00
hash.rs Rename TaskRng to ThreadRng 2014-12-28 13:46:35 +02:00
lib.rs rollup merge of #20410: japaric/assoc-types 2015-01-02 13:51:50 -08:00
macros.rs rollup merge of #20410: japaric/assoc-types 2015-01-02 13:51:50 -08:00
os.rs rollup merge of #20410: japaric/assoc-types 2015-01-02 13:51:50 -08:00
rtdeps.rs libs: merge librustrt into libstd 2014-12-18 23:31:34 -08:00
task.rs Revise std::thread API to join by default 2014-12-18 23:31:52 -08:00
thread.rs Rollup test fixes and rebase conflicts 2015-01-02 10:50:13 -08:00
thunk.rs Revise std::thread API to join by default 2014-12-18 23:31:52 -08:00
tuple.rs std: Stabilize the prelude module 2015-01-02 08:54:06 -08:00
unit.rs std: Remove public bool,tuple,unit modules 2014-12-18 19:13:32 -08:00