11static ankerl::nanobench::Bench
bench;
26 constexpr int NUM= 100;
28 constexpr int NUM = 10000;
37 .unit (
"alloc & free")
38 .run (
"basic type, fast collect", [&] {
39 for (
int i= 0; i <
NUM; i++) {
54 bench.run (
"basic type, bulk collect", [&] {
55 for (
int i= 0; i <
NUM; i++) {
62 for (
int i= 0; i <
NUM; i++) {
69 bench.batch (
NUM).run (
"char, bulk collect", [&] {
70 for (
int i= 0; i <
NUM; i++) {
74 for (
int i= 0; i <
NUM; i++) {
78 bench.run (
"int, bulk collect", [&] {
79 for (
int i= 0; i <
NUM; i++) {
83 for (
int i= 0; i <
NUM; i++) {
87 bench.run (
"long, bulk collect", [&] {
88 for (
int i= 0; i <
NUM; i++) {
92 for (
int i= 0; i <
NUM; i++) {
96 bench.run (
"double, bulk collect", [&] {
97 for (
int i= 0; i <
NUM; i++) {
101 for (
int i= 0; i <
NUM; i++) {
105 bench.batch (1).run (
"struct", [&] {
126 bench.batch (
NUM).run (
"frequent allocation of array, space reused", [&] {
127 for (
int i= 0; i <
NUM; i++) {
130 for (
int i= 0; i <
NUM; i++) {
The list class represents a linked list.
void tm_delete_array(C *Ptr)
static ankerl::nanobench::Bench bench
Complex(double re_, double im_)