commit | 3d8c5531d81dfc6b7d1ed3ec80aa8fb3563d598a | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Fri Mar 06 14:29:25 2009 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Fri Mar 06 14:29:25 2009 +0100 |
tree | 9a941f5817d3a383080818369005ec38f199d65c | |
parent | ec22b2c27ace5a267dc736afb04c5dd107bf1d62 [diff] |
[OPTIM] freq_ctr: do not rotate the counters when reading It's easier to take the counter's age into account when consulting it than to rotate it first. It also saves some CPU cycles and avoids the multiply for outdated counters, finally saving CPU cycles here too when multiple operations need to read the same counter. The freq_ctr code has also shrinked by one third consecutively to these optimizations.