From b3914c1e6ba8c9fd338013e67453c996b6f7ca03 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Tue, 24 Aug 2021 16:57:11 -0500 Subject: [PATCH] a bump allocator didn't work --- BENCHMARKING.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/BENCHMARKING.md b/BENCHMARKING.md index 6b8212b..2dec14e 100644 --- a/BENCHMARKING.md +++ b/BENCHMARKING.md @@ -85,3 +85,18 @@ Benchmark #1: ./target/release/similar-sort benchmark < /usr/share/dict/words ``` Ok, seems fine! + +## Bump allocator + +What if deallocation is the problem? +We don't do anything fancy in `Drop` other than flushing the final output... let's try! +(Using [bump_alloc](https://crates.io/crates/bump_alloc)) + +``` +$ hyperfine './target/release/similar-sort benchmark < /usr/share/dict/words' +Benchmark #1: ./target/release/similar-sort benchmark < /usr/share/dict/words + Time (mean ± σ): 1.351 s ± 0.030 s [User: 5.809 s, System: 2.811 s] + Range (min … max): 1.321 s … 1.406 s 10 runs +``` + +... well, no. Probably not a good idea.