[rbldnsd] ipv6 support: beginnings of an ip6trie dataset
John R Levine
johnl at taugh.com
Tue Mar 19 23:15:55 MSK 2013
> With modern processors, their multi-level caches, and the increase in
> CPU speed relative to main memory access speed, I think cache
> efficiency is the main thing to keep in mind when looking at this sort
> of code.
That and page faults. The fewer pages you use, the more time you can
spend doing work and less time waiting for the disk. I agree that smaller
is better in this application.
> It is possible that my common_prefix() could be optimized to do
> comparisons by words rather than bytes, at least on architectures
> which can efficiently load non-aligned words. Then again, I suspect
> that most compilers are probably doing that for us already (when
> optimization is enabled).
GCC optimizes memcmp() into inline code using whatever the target machine
provides, e.g. repz cmpsb on x86. I wouldn't try to do better than that.
R's,
John
More information about the rbldnsd
mailing list