• Marko Mäkelä's avatar
    MDEV-21133 Optimize access to InnoDB page header fields · 25e2a556
    Marko Mäkelä authored
    Introduce memcpy_aligned<N>(), memcmp_aligned<N>(), memset_aligned<N>()
    and use them for accessing InnoDB page header fields that are known
    to be aligned.
    
    MY_ASSUME_ALIGNED(): Wrapper for the GCC/clang __builtin_assume_aligned().
    Nothing similar seems to exist in Microsoft Visual Studio, and the
    C++20 std::assume_aligned is not available to us yet.
    
    Explicitly specified alignment guarantees allow compilers to generate
    faster code on platforms with strict alignment rules, instead of
    emitting calls to potentially unaligned memcpy(), memcmp(), or memset().
    25e2a556
ibuf0ibuf.cc 138 KB