Would it be better to short-circuit this loop if `len == 0`, i.e. just after `let len` have `if len == 0 { continue }`?