-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb.cpp
More file actions
34 lines (26 loc) · 915 Bytes
/
web.cpp
File metadata and controls
34 lines (26 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#define ANKERL_NANOBENCH_IMPLEMENT
#include "nanobench.h"
// #define MIZU_ENABLE_TRACING
#define MIZU_IMPLEMENTATION
#include "fib_program.h"
#include "bubble_program.h"
int main() {
ankerl::nanobench::Bench().run("Mizu(WEB) fib(40)", []{
registers_and_stack env = {};
setup_enviornment(env);
MIZU_START_FROM_ENVIORNMENT(bubble_program, env);
// ankerl::nanobench::doNotOptimizeAway(env);
auto start = env.memory.end() - numbers.size();
for(size_t i = 0; i < sorted.size(); ++i)
assert(start[i] == sorted[i]);
});
std::cout << std::string(20, '-') << std::endl;
ankerl::nanobench::Bench().minEpochIterations(109).run("Mizu(WEB) bubble(1100)", []{
registers_and_stack env = {};
setup_enviornment(env);
MIZU_START_FROM_ENVIORNMENT(fib_program, env);
auto start = env.memory.end() - numbers.size();
for(size_t i = 0; i < sorted.size(); ++i)
assert(start[i] == sorted[i]);
});
}