1#define _GNU_SOURCE
2#include <roaring/roaring.h>
3#include "benchmark.h"
4
5// see https://github.com/saulius/croaring-rs/issues/6#issuecomment-243341270
6int main() {
7 size_t N = 1000000;
8 uint64_t cycles_start, cycles_final;
9
10 RDTSC_START(cycles_start);
11 for (size_t i = 0; i < N; i++) {
12 roaring_bitmap_t* bm = roaring_bitmap_create();
13 roaring_bitmap_free(bm);
14 }
15 RDTSC_FINAL(cycles_final);
16 printf("%f cycles per object created \n",
17 (cycles_final - cycles_start) * 1.0 / N);
18 return 0;
19}
20