I'm interviewing for a job, and on the test they sent me they provided the following image of 2 ABAP loops on an internal table, and asked which loop will execute faster:
After checking heavily on the internet I came to this 2 different outcomes:
- on the one hand, as for what I found online, the "WHERE" statement is faster than the logical if statement, due to the fact that it directly processes the records satisfying the condition.
- on the other hand, it seems as the 2 loops are doing different things and that the right loop is basically jumping ahead whenever WA2-K != WA1-K, so I believe execution is very dependent on the provided tables.
Am I missing something? is there an obvious 1 answer to this question?