[riot-notifications] [RIOT] reverted 18e97f6dd5457538c7bf39c6abcf346f5a080ca5 (#310)
notifications at github.com
Thu Nov 7 20:31:23 CET 2013
I could offer an O(log CHAR_BIT) implementation instead of the "naïve" implementation for ffs/number_of_lowest_bit: https://gist.github.com/Kijewski/7359805. Maybe being used in the scheduler could justify a more complex solution in favor of speed?
On my home x86 my implementation takes 29s to calculate ffs(u) for u in [0, -1u).
I killed the same test for number_of_lowest_bit after 5 minutes …
With arm-none-eabi-gcc -Os the
* number_of_lowest_bit has 7 instructions.
* ffs has 15 instructions, but could be implemented like @mehlis' quote of __ffshi2, too.
* clz has 13 instructions.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications