in reply to Optimizing a CHI-based data throttler
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Optimizing a CHI-based data throttler
by perlancar (Hermit) on Feb 23, 2020 at 05:57 UTC | |
by perlancar (Hermit) on Feb 24, 2020 at 01:26 UTC |