I added two variants, one which is unbalanced (always fusing a single arena into the group) while the other is balanced (always fusing two groups of equal size). Unfortunately it is difficult to benchmark `upb_Arena_Free()` separately from fuse, since the only way to get a non-zero refcount is to fuse. Results on my machine: ``` CPU: Intel Skylake Xeon with HyperThreading (48 cores) dL1:32KB dL2:1024KB dL3:38MB Benchmark Time(ns) CPU(ns) Iterations ------------------------------------------------------------------- BM_ArenaFuseUnbalanced/2 52.2 52.2 1000000 38.300M items/s BM_ArenaFuseUnbalanced/8 416 416 142315 19.243M items/s BM_ArenaFuseUnbalanced/64 4034 4033 14306 15.868M items/s BM_ArenaFuseUnbalanced/128 8302 8301 6837 15.420M items/s BM_ArenaFuseBalanced/2 54.7 54.7 1000000 36.581M items/s BM_ArenaFuseBalanced/8 425 425 100000 18.845M items/s BM_ArenaFuseBalanced/64 4029 4029 14632 15.886M items/s BM_ArenaFuseBalanced/128 8050 8049 7176 15.902M items/s ``` PiperOrigin-RevId: 518292073pull/13171/head
parent
666a28e6ac
commit
d520014cfa
2 changed files with 50 additions and 0 deletions
Loading…
Reference in new issue