]> git.ipfire.org Git - thirdparty/bind9.git/commit
Optimize rdataset_getownercase not to use bitshifts
authorOndřej Surý <ondrej@sury.org>
Thu, 20 May 2021 11:01:41 +0000 (13:01 +0200)
committerOndřej Surý <ondrej@sury.org>
Thu, 20 May 2021 18:41:29 +0000 (20:41 +0200)
commit5ee9edc4ce85f7f90535efa94691822e0563aa6d
treece48376755bcdd8baa90ba28f445576e3aaa7c6c
parente31cc1eeb436095490c7caa120de148df82ecd6c
Optimize rdataset_getownercase not to use bitshifts

The last rdataset_getownercase() left it in a state where the code was
mix of microoptimizations (manual loop unrolling, complicated bitshifts)
with a code that would always rewrite the character even if it stayed
the same after transformation.

This commit makes sure that we modify only the characters that actually
need to change, removes the manual loop unrolling, and replaces the
weird bit arithmetics with a simple shift and bit-and.
lib/dns/rbtdb.c