Use hashbrown hashmap directly for faster hash (ahash)

This commit is contained in:
Joakim Frostegård 2020-04-12 13:19:07 +02:00
parent eaa42a26b7
commit e61c961126
5 changed files with 16 additions and 4 deletions

View file

@ -15,6 +15,7 @@ name = "aquatic"
bittorrent_udp = { path = "../bittorrent_udp" }
cli_helpers = { path = "../cli_helpers" }
crossbeam-channel = "0.4"
hashbrown = "0.7"
histogram = "0.6"
indexmap = "1"
mimalloc = { version = "0.1", default-features = false }

View file

@ -1,10 +1,10 @@
use std::collections::HashMap;
use std::net::{SocketAddr, IpAddr};
use std::sync::{Arc, atomic::AtomicUsize};
use std::time::Instant;
use parking_lot::Mutex;
use hashbrown::HashMap;
use indexmap::IndexMap;
use parking_lot::Mutex;
pub use bittorrent_udp::types::*;

View file

@ -3,7 +3,7 @@ use std::sync::atomic::Ordering;
use std::time::{Duration, Instant};
use std::vec::Drain;
use parking_lot::{Mutex, MutexGuard};
use parking_lot::MutexGuard;
use crossbeam_channel::{Sender, Receiver};
use rand::{SeedableRng, Rng, rngs::{SmallRng, StdRng}};