Having done all the rubber-ducking, an epiphany: you do not need to re-calculate the sum of bucket counts every time you try_push(). Instead cache this value and re-calculate it only if a bucket died since last try_push()
bw, bliako
In reply to Re: Optimizing a CHI-based data throttler
by bliako
in thread Optimizing a CHI-based data throttler
by perlancar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |