[][src]Struct rustc_data_structures::fx::FxHasher

pub struct FxHasher { /* fields omitted */ }

A speedy hash algorithm for use within rustc. The hashmap in liballoc by default uses SipHash which isn't quite as speedy as we want. In the compiler we're not really worried about DOS attempts, so we use a fast non-cryptographic hash.

This is the same as the algorithm used by Firefox -- which is a homespun one not based on any widely-known algorithm -- though modified to produce 64-bit hash values instead of 32-bit hash values. It consistently out-performs an FNV-based hash within rustc itself -- the collision rate is similar or slightly worse than FNV, but the speed of the hash function itself is much higher because it works on up to 8 bytes at a time.

Trait Implementations

impl Hasher for FxHasher[src]

default fn write_u128(&mut self, i: u128)
1.26.0
[src]

Writes a single u128 into this hasher.

default fn write_i8(&mut self, i: i8)
1.3.0
[src]

Writes a single i8 into this hasher.

default fn write_i16(&mut self, i: i16)
1.3.0
[src]

Writes a single i16 into this hasher.

default fn write_i32(&mut self, i: i32)
1.3.0
[src]

Writes a single i32 into this hasher.

default fn write_i64(&mut self, i: i64)
1.3.0
[src]

Writes a single i64 into this hasher.

default fn write_i128(&mut self, i: i128)
1.26.0
[src]

Writes a single i128 into this hasher.

default fn write_isize(&mut self, i: isize)
1.3.0
[src]

Writes a single isize into this hasher.

impl Default for FxHasher[src]

Auto Trait Implementations

impl Send for FxHasher

impl Sync for FxHasher

Blanket Implementations

impl<T> Erased for T[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<E> SpecializationError for E[src]