it all depends what you are trying to do.
why are the sizes different? make them equal and you can leave out the checks that slow down things.
keep a counter that you don't need to go to the end if there are only 10 elements
use a list/map which is counter based already
...
This is a theoretical situation where there is no guarantee that the arrays will be the same size.
For example processing items which were read from a user generated database. Another example could be a physics engine, 256 galaxies, 512 suns, 1024 planets, all interacting through gravity.
I just want to find the most efficient way to optimize / write scalable code.
Thanks to you, we have already found that the SELECT method is way slower than an IF statement.
Pretty awesome piece of knowledge!
I'll never use a SELECT in a cycle again.