author | Florian Forster <octo@collectd.org> | |
Tue, 14 Jan 2014 06:24:40 +0000 (07:24 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Tue, 14 Jan 2014 06:41:34 +0000 (07:41 +0100) | ||
commit | bdfb3f52d9df3ee202d926d1e5473693cc9b9032 | |
tree | f22d5b3624e5d47ee13703c88f33d5e9cc228da8 | tree | snapshot |
parent | 50d1b34d63bfce7bc264834eebf75800d49c1e44 | commit | diff |
src/utils_cache.c: Very minor performance improvement.
cache_compare() is one of the hottest functions in collectd. Depending how many
metrics collectd handles (how deep the tree is) it gets called an order of
magnitude or two more often than the number of metrics handled. With 100k
metrics, about 6.6% of the CPU time were spent within cache_compare(), with
this commit this reduces to 6.3% (that's, uhm, 4.7% faster?).
cache_compare() is one of the hottest functions in collectd. Depending how many
metrics collectd handles (how deep the tree is) it gets called an order of
magnitude or two more often than the number of metrics handled. With 100k
metrics, about 6.6% of the CPU time were spent within cache_compare(), with
this commit this reduces to 6.3% (that's, uhm, 4.7% faster?).
src/utils_cache.c | diff | blob | history |