Skip to content
  • Ondřej Surý's avatar
    Optimize rdataset_getownercase not to use bitshifts · 9f13e610
    Ondřej Surý authored
    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.
    
    (cherry picked from commit 5ee9edc4)
    9f13e610