Optimize COUNT_ZERO_MSBS macro
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 7 May 2012 11:00:12 +0000 (13:00 +0200)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Mon, 7 May 2012 11:45:33 +0000 (21:45 +1000)
commit5289b309cfc0a36c02077810cd37deb0038c865f
tree3588f464f9b9a4f035729d70a4b0d4294762e765
parentd9fde55674c533ccce7a2b0145b4893a74b7f086
Optimize COUNT_ZERO_MSBS macro

Reorder the conditions according to the expected distribution of input
signal. This seems to make it almost as fast as the clz builtin using
the bsr instruction.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
src/libFLAC/bitreader.c