@@ -9,16 +9,16 @@ static void CurrentCLike(benchmark::State& state) {
9
9
10
10
static constexpr size_t embedded_file_count = 2 ;
11
11
12
- static const char * embedded_file_name_0 = " :/Resources/sandia/Sandia_Modules.json" ;
13
- static const char * embedded_file_name_1 = " :/Resources/sandia/Sandia_Modules2.json" ;
12
+ static const char * embedded_file_name_0 = " :/Resources/sandia/Sandia_Modules.json" ;
13
+ static const char * embedded_file_name_1 = " :/Resources/sandia/Sandia_Modules2.json" ;
14
14
15
- static const uint8_t embedded_file_0[] = {0x78 ,0x9c ,0xed ,0xbd ,0x5d ,0xaf ,0xe3 ,0xd8 };
16
- static const uint8_t embedded_file_1[] = {0xed ,0xaf ,0xe3 , 0xbd ,0x5d ,0xaf ,0xe3 ,0xd8 ,0xe3 };
15
+ static const uint8_t embedded_file_0[] = {0x78 , 0x9c , 0xed , 0xbd , 0x5d , 0xaf , 0xe3 , 0xd8 };
16
+ static const uint8_t embedded_file_1[] = {0xed , 0xaf , 0xe3 , 0xbd , 0x5d , 0xaf , 0xe3 , 0xd8 , 0xe3 };
17
17
18
18
static const size_t embedded_file_len_0 = 8 ;
19
19
static const size_t embedded_file_len_1 = 9 ;
20
20
21
- static const char * embedded_file_names[] = {
21
+ static const char * embedded_file_names[] = {
22
22
embedded_file_name_0,
23
23
embedded_file_name_1,
24
24
@@ -28,14 +28,14 @@ static void CurrentCLike(benchmark::State& state) {
28
28
embedded_file_len_1,
29
29
30
30
};
31
- static const uint8_t * embedded_files[] = {
31
+ static const uint8_t * embedded_files[] = {
32
32
embedded_file_0,
33
33
embedded_file_1,
34
34
};
35
35
36
36
// Make sure the variable is not optimized away by compiler
37
37
benchmark::DoNotOptimize (embedded_file_names);
38
- benchmark::DoNotOptimize (embedded_file_lens);
38
+ // benchmark::DoNotOptimize(embedded_file_lens);
39
39
benchmark::DoNotOptimize (embedded_files);
40
40
41
41
for (size_t i = 0 ; i < embedded_file_count; ++i) {
@@ -60,13 +60,13 @@ static void ConstexprCLike(benchmark::State& state) {
60
60
static constexpr auto embedded_file_name_0 = " :/Resources/sandia/Sandia_Modules.json" ;
61
61
static constexpr auto embedded_file_name_1 = " :/Resources/sandia/Sandia_Modules2.json" ;
62
62
63
- static constexpr uint8_t embedded_file_0[] = {0x78 ,0x9c ,0xed ,0xbd ,0x5d ,0xaf ,0xe3 ,0xd8 };
64
- static constexpr uint8_t embedded_file_1[] = {0xed ,0xaf ,0xe3 , 0xbd ,0x5d ,0xaf ,0xe3 ,0xd8 ,0xe3 };
63
+ static constexpr uint8_t embedded_file_0[] = {0x78 , 0x9c , 0xed , 0xbd , 0x5d , 0xaf , 0xe3 , 0xd8 };
64
+ static constexpr uint8_t embedded_file_1[] = {0xed , 0xaf , 0xe3 , 0xbd , 0x5d , 0xaf , 0xe3 , 0xd8 , 0xe3 };
65
65
66
66
static constexpr size_t embedded_file_len_0 = 8 ;
67
67
static constexpr size_t embedded_file_len_1 = 9 ;
68
68
69
- static const char * embedded_file_names[] = {
69
+ static const char * embedded_file_names[] = {
70
70
embedded_file_name_0,
71
71
embedded_file_name_1,
72
72
@@ -76,14 +76,14 @@ static void ConstexprCLike(benchmark::State& state) {
76
76
embedded_file_len_1,
77
77
78
78
};
79
- static const uint8_t * embedded_files[] = {
79
+ static const uint8_t * embedded_files[] = {
80
80
embedded_file_0,
81
81
embedded_file_1,
82
82
};
83
83
84
84
// Make sure the variable is not optimized away by compiler
85
85
benchmark::DoNotOptimize (embedded_file_names);
86
- benchmark::DoNotOptimize (embedded_file_lens);
86
+ // benchmark::DoNotOptimize(embedded_file_lens);
87
87
benchmark::DoNotOptimize (embedded_files);
88
88
89
89
for (size_t i = 0 ; i < embedded_file_count; ++i) {
@@ -97,8 +97,6 @@ static void ConstexprCLike(benchmark::State& state) {
97
97
}
98
98
}
99
99
100
-
101
-
102
100
// Register the function as a benchmark
103
101
BENCHMARK (ConstexprCLike);
104
102
0 commit comments