MCPcopy Create free account
hub / github.com/boostorg/histogram / compare_1d

Function compare_1d

test/speed_root.cpp:32–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void compare_1d(unsigned n, int distrib) {
33 auto r = random_array(n, distrib);
34
35 double best_root = std::numeric_limits<double>::max();
36 for (unsigned k = 0; k < 20; ++k) {
37 TH1I hroot("", "", 100, 0, 1);
38 auto t = clock();
39 for (unsigned i = 0; i < n; ++i) hroot.Fill(r[i]);
40 t = clock() - t;
41 best_root = std::min(best_root, double(t) / CLOCKS_PER_SEC);
42 }
43 printf("root %.3f\n", best_root);
44}
45
46void compare_2d(unsigned n, int distrib) {
47 auto r = random_array(n, distrib);

Callers 1

mainFunction · 0.70

Calls 1

random_arrayFunction · 0.70

Tested by

no test coverage detected