Skip to content

Commit a59fdd6

Browse files
committed
update the readme with regard to runtime performance
1 parent a36c30f commit a59fdd6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ Many more usage examples can be found in the [unit tests](https://github.com/mni
9898
### **Is it fast?**
9999
100100
A [simple benchmark](https://github.com/mnikander/cpp_sequence/blob/main/benchmark/reduce.benchmark.cpp) is included, which generates a random vector of integers and sums all the even integers together.
101-
Initial benchmarking runs, without a direct `from_range` source, indicate that the sequence implementation takes 3-6 times as long as a handcrafted for-loop.
102-
Once a range source has been implemented, a fair comparison can be done.
101+
Initial benchmarking runs indicate that the sequence implementation takes 2-6 times as long as a handcrafted for-loop.
103102
104103
### **Why Not Just Use `std::ranges`?**
105104

benchmark/reduce.benchmark.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static void BM_sequence_map_hack(benchmark::State& state) {
105105
}
106106

107107
// Register the function as a benchmark
108-
BENCHMARK(BM_for_loop);
108+
BENCHMARK(BM_for_loop); // the fastest by at least a factor of two
109109
BENCHMARK(BM_sequence_from_range);
110-
BENCHMARK(BM_sequence_from_vector);
110+
BENCHMARK(BM_sequence_from_vector); // of the sequence implementations, this one is currently the fastest
111111
BENCHMARK(BM_sequence_map_hack);

0 commit comments

Comments
 (0)