From 74976a1d049a01a0117f9dcb14d72a2678be4af8 Mon Sep 17 00:00:00 2001 From: Martin Lambertsen Date: Mon, 21 Oct 2024 06:58:09 +0200 Subject: [PATCH] Take measurement inaccuracy intervals into account Stating one version being faster while the intervals have a considerable overlap is probably not accurate. --- src/ch13-04-performance.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ch13-04-performance.md b/src/ch13-04-performance.md index 0dbc7420a0..3525220aac 100644 --- a/src/ch13-04-performance.md +++ b/src/ch13-04-performance.md @@ -14,10 +14,10 @@ test bench_search_for ... bench: 19,620,300 ns/iter (+/- 915,700) test bench_search_iter ... bench: 19,234,900 ns/iter (+/- 657,200) ``` -The iterator version was slightly faster! We won’t explain the benchmark code -here, because the point is not to prove that the two versions are equivalent -but to get a general sense of how these two implementations compare -performance-wise. +The two implementations have similar performance! We won’t explain the +benchmark code here, because the point is not to prove that the two versions +are equivalent but to get a general sense of how these two implementations +compare performance-wise. For a more comprehensive benchmark, you should check using various texts of various sizes as the `contents`, different words and words of different lengths