• Jakub Stachowski's avatar
    Use __builtin_clz instead of default implementation of fixnormz on GCC · e036dbc8
    Jakub Stachowski authored
    The library contains architecture specific versions of the clz functions
    for arm and mips, but the fallback C version for other architectures is
    pretty slow.
    
    By using __builtin_clz on GCC (available since GCC 3.4), we get a
    significant (20-40 %) speedup of the total running time on x86.
    
    Speed difference: 5.1 s instead of 8.6 s for AAC-LC 128 kbit/s and
    3.8 s instead of 4.9 s for HE-AACv2 32 kbit/s, on an i7.
    e036dbc8
clz.h 7.09 KB