mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
aquatic_ws: deserialize InMessage with simd-json for performance
From 18% to 13% CPU time during load test run. Criterion benchmark of deserialization got about 90% improvement.
This commit is contained in:
parent
539cf03f93
commit
5d40954936
11 changed files with 1098 additions and 1031 deletions
|
|
@ -37,10 +37,10 @@ pub fn bench(c: &mut Criterion) {
|
|||
offer_id: Some(OfferId(info_hash.0))
|
||||
});
|
||||
|
||||
let ws_message = request.to_ws_message();
|
||||
let mut ws_message = request.to_ws_message();
|
||||
|
||||
c.bench_function("deserialize-announce-request", |b| b.iter(||
|
||||
InMessage::from_ws_message(black_box(&ws_message))
|
||||
InMessage::from_ws_message(black_box(&mut ws_message))
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue