zig icon indicating copy to clipboard operation
zig copied to clipboard

InternPool: various optimizations

Open jacobly0 opened this issue 1 year ago • 0 comments

This is the current progress in my InternPool optimization branch. Last I checked, it makes up for about half of the losses from InternPool. Opening this now before it gets too out of date with master.

Benchmark 1 (122 runs): master/bin/zig build-exe --stack 33554432 src/main.zig --mod build_options::zig-cache/c/3fb6e89d536536de349edafc1438f486/options.zig --deps build_options -fno-emit-bin
  measurement      mean ± σ               min … max                   outliers         delta
  wall_time        4.924s ± 60.51ms       4.749s … 5.104s               5 ( 4%)        0%
  peak_rss         428M ± 644K            426M … 429M                   0 ( 0%)        0%
  cpu_cycles       24644932956 ± 40187532523641864552 … 25413638166     0 ( 0%)        0%
  instructions     46260045656 ± 18645    46260004387 … 46260088670     0 ( 0%)        0%
  cache_references 2069202759 ± 13691256  2044999182 … 2114724459       7 ( 6%)        0%
  cache_misses     98526792 ± 2692262     91946493 … 105599801          0 ( 0%)        0%
  branch_misses    95286125 ± 745741      93675010 … 97676390           3 ( 2%)        0%
Benchmark 2 (148 runs): opt/bin/zig build-exe --stack 33554432 src/main.zig --mod build_options::zig-cache/c/3fb6e89d536536de349edafc1438f486/options.zig --deps build_options -fno-emit-bin
  measurement      mean ± σ               min … max                   outliers         delta
  wall_time        4.063s ± 32.536ms      3.998s … 4.174s               2 ( 1%)        ⚡- 17.5% ±  0.2%
  peak_rss         426M ± 611K            424M … 428M                   4 ( 3%)          -  0.4% ±  0.0%
  cpu_cycles       20286406609 ± 33506016819420543796 … 20934361547     3 ( 2%)        ⚡- 17.7% ±  0.4%
  instructions     41302252201 ± 14668    41302223526 … 41302308706     5 ( 3%)        ⚡- 10.7% ±  0.0%
  cache_references 1911471150 ± 9618251   1890673407 … 1945021142       8 ( 5%)        ⚡-  7.6% ±  0.1%
  cache_misses     87170902 ± 1770803     82167017 … 91797669           0 ( 0%)        ⚡- 11.5% ±  0.5%
  branch_misses    74823177 ± 403963      73646636 … 75866357           1 ( 1%)        ⚡- 21.5% ±  0.1%

jacobly0 avatar Jun 20 '23 03:06 jacobly0