Think you missed the point. If our array matches the program array, we
don't need the for loop inside a for loop that you now have.

So for a ts with 50 streams and current program with 10 streams, you will
do 50*(2*10) = 1000 checks for each packet of data (maybe a bit less if
there are some early returnd) .

With my suggestion you'd only do 10, rather big difference.