On 04/07/2019 16:58, Matthew Wilcox wrote:
On Thu, Jul 04, 2019 at 04:00:00PM +0300, Boaz Harrosh wrote:
<>
Matthew you must be kidding an ilog2 in binary is zero clocks (Return the highest bit or something like that)
You might want to actually check the documentation instead of just making shit up.
Yes you are right I stand corrected. Must be smoking ;-)
https://www.agner.org/optimize/instruction_tables.pdf
I think in this instance what we want is BSR (aka ffz) since the input is going to be one of 0, 1, 3, 7, 15 or 31 (and we want 0, 1, 2, 3, 4, 5 as results).
<>
The compiler doesn't know the range of 'sibs'. Unless we do the profile-feedback thing.
Would you please consider the use of get_order() macro from #include <getorder.h> Just for the sake of understanding? (Or at least a comment)
Thanks Boaz