Files
zig/lib/std
Niles Salter ff5850183e [priority_deque] simplify & optimize isMinLayer
LLVM has trouble compiling the old implementation, (presumably) because `leading_zeros` is thought to be a `u7` rather than a `u6`, which means `63 - clz` is not equivalent to `63 ^ clz`, which means it can't deduce that the final condition can simply be flipped. (I am assuming `usize` is a `u64` here for ease of understanding, but it's the same for any power of 2)

https://zig.godbolt.org/z/Pbj4P7ob3

The new version is slightly better too because `isMinLayer(maxInt(usize))` is now well-defined behavior.
2023-06-22 01:57:28 -07:00
..
2023-06-20 19:01:34 -04:00
2023-06-20 10:56:23 -07:00
2023-04-22 13:09:15 +03:00
2023-06-10 20:42:30 -07:00
2023-04-30 18:16:04 -07:00
2023-04-30 18:16:04 -07:00
2023-04-30 18:16:04 -07:00
2023-03-17 17:50:25 +01:00
2023-04-30 18:16:04 -07:00