mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 18:55:32 +00:00
Use hashbrown hashmap directly for faster hash (ahash)
This commit is contained in:
parent
eaa42a26b7
commit
e61c961126
5 changed files with 16 additions and 4 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -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}};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue