In theory we could implement this without allocation