[riot-notifications] [RIOT-OS/RIOT] core/bitarithm: introduce bitarithm_get/set_masked(), convert pca9685 (#12238)

Kaspar Schleiser notifications at github.com
Mon Sep 16 21:46:27 CEST 2019

> for some reason, when replacing the loop with `bitarithm_lsb()`, the compiler will _not_ optimize it away

That might be architecture dependent. ```bitarithm_lsb()``` can use multiple implementations (currently, the "naive" implementation using a loop, one using debruijn multiplication and __builtin_lsb()). On ARMs without CLZ, the debruijn method is the fastest in the scheduler use case, so that's used. That version pretty much prevents the compiler from recognizing any pattern... 

Could you try if the compiler optimizes correctly when using ```__builtin_lsb()```?

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190916/e086d150/attachment.htm>

More information about the notifications mailing list