mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-06-10 01:23:33 -04:00
70dc910086
Since Zig provides @clz and not @ffs (find-first-set), log2 for comptime integers needs to be computed algorithmically. To avoid hitting the backward branch quota, this updates log2(x) to use a simple O(log N) algorithm.