N
например, foreach медленнее for
Size: a a a
N
M
o
t
N
N
N
t
t
AZ
БС
Might hurt performance, because the JIT can't optimize forEach()+lambda to the same extent as plain loops, especially now that lambdas are new. By "optimization" I do not mean the overhead of calling lambdas (which is small), but to the sophisticated analysis and transformation that the modern JIT compiler performs on running code.
t
KR
S
KR
S
AT
KR
AZ
N