From 51f2fcea45955e35f32211c3ade755a740ca5ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Mon, 6 Apr 2020 14:38:59 +0200 Subject: [PATCH] turn of mimalloc security features, seemingly improving performance --- aquatic/Cargo.toml | 2 +- aquatic_bench/Cargo.toml | 2 +- aquatic_bench/src/bin/bench_handlers/main.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aquatic/Cargo.toml b/aquatic/Cargo.toml index a32a967..7bde6ed 100644 --- a/aquatic/Cargo.toml +++ b/aquatic/Cargo.toml @@ -15,7 +15,7 @@ name = "aquatic" bittorrent_udp = { path = "../bittorrent_udp" } dashmap = "3" indexmap = "1" -mimalloc = "0.1" +mimalloc = { version = "0.1", default-features = false } mio = { version = "0.7", features = ["udp", "os-poll", "os-util"] } net2 = "0.2" rand = { version = "0.7", features = ["small_rng"] } diff --git a/aquatic_bench/Cargo.toml b/aquatic_bench/Cargo.toml index 1fa1347..4b40267 100644 --- a/aquatic_bench/Cargo.toml +++ b/aquatic_bench/Cargo.toml @@ -17,7 +17,7 @@ name = "plot_pareto" [dependencies] aquatic = { path = "../aquatic" } indicatif = "0.14" -mimalloc = "0.1" +mimalloc = { version = "0.1", default-features = false } num-format = "0.4" plotly = "0.4" rand_distr = "0.2" diff --git a/aquatic_bench/src/bin/bench_handlers/main.rs b/aquatic_bench/src/bin/bench_handlers/main.rs index cb1d83d..d73bacb 100644 --- a/aquatic_bench/src/bin/bench_handlers/main.rs +++ b/aquatic_bench/src/bin/bench_handlers/main.rs @@ -4,9 +4,9 @@ //! ``` //! ## Average results over 100 rounds //! -//! Connect handler: 3 246 351 requests/second, 308.21 ns/request -//! Announce handler: 348 740 requests/second, 2873.65 ns/request -//! Scrape handler: 1 115 949 requests/second, 898.17 ns/request +//! Connect handler: 3 459 722 requests/second, 289.22 ns/request +//! Announce handler: 390 674 requests/second, 2568.55 ns/request +//! Scrape handler: 1 039 374 requests/second, 963.02 ns/request //! ``` use std::time::{Duration, Instant};