Agreed, and it was a poor choice from me. (s-1) should be correct,
and gcc-3.2 with -Wsequence-point is happy about it.
> Also, did I understand it right that you want to use fls even on
> architectures that don't have it as a builtin? I would guess that will
> actually be noticeably slower, since generic_fls is so complicated.
Well, it is not that bad, and it is still faster [did a quick test now]
0.144s, 0.241s and 0.358s
[get_order on all numbers from 0 to 90000000 with the optimized version,
the one that uses generic_fls and the old one].
Inaky Perez-Gonzalez -- Not speaking for Intel - opinions are my own [or my
fault]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/