switch network/protocol to hashbrown (5% perf increase)

This commit is contained in:
Marcel Märtens 2021-04-29 19:12:57 +02:00
parent 653fb065e0
commit 1ead240ad2
4 changed files with 6 additions and 8 deletions

1
Cargo.lock generated
View File

@ -5670,6 +5670,7 @@ dependencies = [
"bitflags",
"bytes",
"criterion",
"hashbrown",
"prometheus",
"rand 0.8.3",
"tokio",

View File

@ -24,6 +24,7 @@ rand = { version = "0.8" }
# async traits
async-trait = "0.1.42"
bytes = "^1"
hashbrown = { version = ">=0.9, <0.12" }
[dev-dependencies]
async-channel = "1.5.1"

View File

@ -12,10 +12,8 @@ use crate::{
};
use async_trait::async_trait;
use bytes::BytesMut;
use std::{
collections::HashMap,
time::{Duration, Instant},
};
use hashbrown::HashMap;
use std::time::{Duration, Instant};
use tracing::info;
#[cfg(feature = "trace_pedantic")]
use tracing::trace;

View File

@ -11,10 +11,8 @@ use crate::{
};
use async_trait::async_trait;
use bytes::BytesMut;
use std::{
collections::HashMap,
time::{Duration, Instant},
};
use hashbrown::HashMap;
use std::time::{Duration, Instant};
use tracing::info;
#[cfg(feature = "trace_pedantic")]
use tracing::trace;