mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 02:05:30 +00:00
aquatic_http: add criterion benchmarks for request from path parsing
About 35% improvement by using both memchr methods
This commit is contained in:
parent
9b0956cc91
commit
a8e355f22a
17 changed files with 2441 additions and 5 deletions
|
|
@ -147,7 +147,7 @@ impl Request {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
// Seems to be a bit faster than non-memchr version
|
||||
/// Seems to be somewhat faster than non-memchr version
|
||||
fn parse_key_value_pairs_memchr<'a>(
|
||||
info_hashes: &mut Vec<String>,
|
||||
data: &mut HashMap<&'a str, String>,
|
||||
|
|
@ -222,6 +222,7 @@ impl Request {
|
|||
Ok(processed)
|
||||
}
|
||||
|
||||
/// Quite a bit faster than non-memchr version
|
||||
fn urldecode_memchr(value: &str) -> anyhow::Result<String> {
|
||||
let mut processed = String::with_capacity(value.len());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue