Closed
Description
Currently it's more general than it needs to be, resulting in the next-power-of-two code appearing in lots of places due to inlining. But vec capacities are usually powers of two. I think it should be something like:
if popcount(capacity) != 1 {
// non-power-of-two case
capacity_slow()
} else {
capacity << 1
}