Number 1 should be faster because you're looping over container_length only once but in Number 2 you're looping over containers 4 times and doing the same thing