ridiculousfish / libdivide

Official git repository for libdivide: optimized integer division
http://libdivide.com
Other
1.09k stars 77 forks source link

changed for VC compiler and 32bit platform #7

Closed dczarnec closed 8 years ago

dczarnec commented 10 years ago

For VC compiler and 32bit platform, function libdivide__count_leading_zeros64 changed to use _BitScanReverse intinsic function instead of while loop. Tested only on Windows CE 6.0 ARM Cortex A8 and libdivide::divider perfoms about 10-20% faster than the original implementation. The _BitScanReverse is not implemented under CE VC2008 and was implemented by me in separate file as 31-_CountLeadingZeros.

kimwalisch commented 8 years ago

The same code change has been delivered by another pull request https://github.com/ridiculousfish/libdivide/pull/25/commits/13a5142081d9f36c337472e16180b96f8aa84f45