11static ankerl::nanobench::Bench
bench;
23 int n= 6 + ((int) (2 *
sin (1.0 * i *
d)));
25 for (
int j= 0;
j < n; i++,
j++)
35 bench.minEpochIterations (2000);
37 bench.minEpochIterations (200000);
39 bench.complexityN (1).run (
"construct atomic tree",
41 bench.run (
"construct compound tree of depth from argument",
42 [&] {
test_tree (10,
"abc",
"def",
"ghi"); });
43 bench.run (
"construct compound tree from array",
45 for (
int d= 1;
d < 6;
d++) {
47 bench.run (
"construct compound tree of given depth",
50 for (
int d= 1;
d < 6;
d++) {
52 bench.complexityN (
d).run (
"type of tree",
55 for (
int d= 1;
d < 6;
d++) {
59 for (
int d= 1;
d < 6;
d++) {
61 bench.complexityN (
d).run (
"immutable index of tree",
64 for (
int d= 1;
d < 6;
d++) {
66 bench.complexityN (
d).run (
"mutable index of tree",
69 for (
int d= 1;
d < 6;
d++) {
73 for (
int d= 1;
d < 6;
d++) {
76 bench.complexityN (
d).run (
"equality of tree", [&] {
tr1 ==
tr2; });
The list class represents a linked list.
static test_tree generate_test_tree(int i=0, int d=3)
lolly::data::lolly_tree< int > test_tree
static ankerl::nanobench::Bench bench
array< lolly_tree< T > > A(lolly_tree< T > t)
array< lolly_tree< T > > & AR(lolly_tree< T > t)
bool is_compound(lolly_tree< T > t)
lolly_tree< T > copy(lolly_tree< T > t)
string as_string(int16_t i)