mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
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.