• Ganesh Ajjanagadde's avatar
    lavc/pcm_tablegen: slight speedup of table generation · 43624a66
    Ganesh Ajjanagadde authored
    This gets rid of some branches to speed up table generation slightly
    (impact higher on mulaw than alaw). Tables are identical to before,
    tested with FATE.
    
    Sample benchmark (Haswell, GNU/Linux+gcc):
    old:
     313494 decicycles in build_alaw_table,    4094 runs,      2 skips
     315959 decicycles in build_alaw_table,    8190 runs,      2 skips
    
     323599 decicycles in build_ulaw_table,    4095 runs,      1 skips
     318849 decicycles in build_ulaw_table,    8188 runs,      4 skips
    
    new:
     261902 decicycles in build_alaw_table,    4096 runs,      0 skips
     266519 decicycles in build_alaw_table,    8192 runs,      0 skips
    
     209657 decicycles in build_ulaw_table,    4096 runs,      0 skips
     232656 decicycles in build_ulaw_table,    8192 runs,      0 skips
    Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
    43624a66
pcm_tablegen.h 3.51 KB