Ilya Dryomov 74a5293832 crush: don't normalize input of crush_ln iteratively
Use __builtin_clz() supported by GCC and Clang to figure out
how many bits we should shift instead of shifting by a bit
in a loop until the value gets normalized. Improves performance
of this function by up to 3x in worst-case scenario and overall
straw2 performance by ~10%.

Reflects ceph.git commit 110de33ca497d94fc4737e5154d3fe781fa84a0a.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2016-10-05 23:02:04 +02:00
..
2016-06-28 05:26:14 -04:00
2016-07-28 12:26:31 -07:00
2016-07-05 14:08:47 -07:00
2015-10-23 03:05:19 -07:00
2016-05-29 22:33:25 -07:00
2016-08-12 12:32:24 -07:00
2016-07-26 16:19:19 -07:00
2016-08-02 02:57:30 +03:00
2016-06-09 23:41:03 -07:00
2016-07-19 20:49:16 -07:00
2016-07-19 20:49:16 -07:00