in reply to Re^4: Iterating through Two Arrays. Is there a better use of memory?
in thread Iterating through Two Arrays. Is there a better use of memory?

Note that it's only the runtime that's quadratic (or, to be precise, O(n*m)). The memory usage of the algorithm is bounded by O(n+m).