Question about comparing two arrays

Hi,

I have a question regarding the “Identical” node (visualized as ==) to compare two arrays.
Within on of the blueprints, preceded by a foreach, we have some code that checks 2 arrays (rows) and eventually stops when a match is found.

Our question is a performance related :
Does the identical node also compares the length of the arrays first, before looking at its individual members? That would be much more optimized since there are many cases where the amount of members between the arrays do not match. So, there’s no need to further look into the values of those members as a match will never be found there. If the length is not compared, would it be worth the effort to add a check on session lenght first and only use the identical node comparison to check rows with an equal amount of members? Each array has a few hundred rows here so not sure if the check for session length may even slow us down rather than improve the calculation time.

I think it’s safe to assume it’s written efficiently. If you have Visual Studio installed, you can actually look at the comparison code ( mine’s not working at the moment… ).

EDIT: I can confirm it checks the length of both arrays first: