diff options
Diffstat (limited to 'Readme.md')
-rw-r--r-- | Readme.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..67d3dc5 --- /dev/null +++ b/Readme.md @@ -0,0 +1,40 @@ +# Arena allocator benchmark + +`50_000_000` of 16 byte allocations, `-Ofast`, without sanitizers. + +arena-malloc (`realloc` 1.5x of size): + +``` +$ perf stat -r10 -B ./arena-malloc + + Performance counter stats for './arena-malloc' (10 runs): + + 340.31 msec task-clock:u # 0.965 CPUs utilized ( +- 0.77% ) + 0 context-switches:u # 0.000 /sec + 0 cpu-migrations:u # 0.000 /sec + 6,055 page-faults:u # 17.792 K/sec ( +- 0.01% ) + 255,422,997 cycles:u # 0.751 GHz ( +- 0.07% ) + 700,131,646 instructions:u # 2.74 insn per cycle ( +- 0.00% ) + 100,031,363 branches:u # 293.938 M/sec ( +- 0.00% ) + 2,612 branch-misses:u # 0.00% of all branches ( +- 0.97% ) + + 0.35257 +- 0.00692 seconds time elapsed ( +- 1.96% ) +``` + +arena-memstream (`open_memstream`, `fwrite`, `fflush`): +``` +$ perf stat -r10 -B ./arena-memstream + + Performance counter stats for './arena-memstream' (10 runs): + + 3,914.75 msec task-clock:u # 0.978 CPUs utilized ( +- 0.07% ) + 0 context-switches:u # 0.000 /sec + 0 cpu-migrations:u # 0.000 /sec + 46,927 page-faults:u # 11.987 K/sec ( +- 0.39% ) + 8,395,773,261 cycles:u # 2.145 GHz ( +- 0.07% ) + 14,089,659,266 instructions:u # 1.68 insn per cycle ( +- 0.00% ) + 2,871,455,062 branches:u # 733.496 M/sec ( +- 0.00% ) + 447,933 branch-misses:u # 0.02% of all branches ( +- 47.49% ) + + 4.00461 +- 0.00335 seconds time elapsed ( +- 0.08% ) +``` |