It depends on the situation.
One kind of flow in the lambda expression is called parallelSteam, which is called parallel flow. Compared with stream flow, the processing of convection is parallel, so it is certainly more efficient than the simple for loop. However, parallel streams have a disadvantage that they are prone to concurrent security problems. So this thing should be used with caution.
Of course, stream stream also has its own advantages. If you have multiple processing operations, such as filtering the elements of specific conditions in a collection, transforming them, and then traversing the output, multiple operations are involved at this time. If you use the traditional for loop, it is not as efficient as stream. Because it encapsulates the algorithms and methods for operating the set, it is processed from the bottom. If it is just a traversal operation, the efficiency of the two is not very different.
More importantly, using stream stream can make the code more concise. Although it is not very friendly to old programmers, you will like this writing method if you spend some time researching.