Skip to content

Commit 50f9eb4

Browse files
authored
Merge branch 'main' into codex/研究代码与标准库速度差异
2 parents 0ce975b + c9bed19 commit 50f9eb4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

bitvector_benchmark.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ static void BM_Std_Access(benchmark::State& state) {
7272
}
7373
}
7474

75+
7576
static void BM_Bowen_SetBitTrue6(benchmark::State& state) {
7677
size_t n = state.range(0);
7778
for (auto _ : state) {

main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
#include <chrono>
44
#include <iostream>
55
#include <vector>
6+
67
// Benchmark size: 1 billion elements
78
constexpr size_t SIZE = 1000000000;
9+
810
// Benchmarks the performance of std::vector<bool> for setting, accessing, and traversing elements.
911
void benchmarkStdVectorBool(){
1012

0 commit comments

Comments
 (0)