I know this is good design. But I don't really like the fact that this loops the array twice. Do you think the time needed for the extra loop will always be negligible?