mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-03 04:40:50 +03:00
Speed up interpreter with gcc CLZ intrinsic.
This commit is contained in:
parent
868ed7d758
commit
549ff28b41
@ -17,8 +17,11 @@
|
||||
*/
|
||||
# define c3_wiseof(x) (((sizeof (x)) + 3) >> 2)
|
||||
|
||||
/* Bits in byte.
|
||||
/* Bit counting.
|
||||
*/
|
||||
#if 1
|
||||
# define c3_bits_word(w) ((w) ? (32 - __builtin_clz(w)) : 0)
|
||||
#else
|
||||
#ifdef C3_GLOBAL
|
||||
c3_y Bts_y[] = {
|
||||
0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
@ -50,6 +53,7 @@
|
||||
: ((w) >> 8) \
|
||||
? (8 + Bts_y[(w) >> 8]) \
|
||||
: Bts_y[(w)] )
|
||||
#endif
|
||||
|
||||
/* Min and max.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user