c222173234
Benchmark (sourceFname) Mode Cnt Score Error Units StreamBench.foreachOnChildrenStream /PLSQLParser.java avgt 4 14,992 ± 0,169 ms/op StreamBench.foreachOnChildrenStreamOpt /PLSQLParser.java avgt 4 8,179 ± 0,141 ms/op StreamBench.loopOnChildrenStream /PLSQLParser.java avgt 4 9,694 ± 0,549 ms/op StreamBench.optimizedLoop /PLSQLParser.java avgt 4 7,631 ± 0,143 ms/op "foreachOnChildrenStreamOpt" is the new implementation, the old is "foreachOnChildrenStream". For comparison, this new impl of forEach with a lambda appears slightly faster than using a for-each loop on the children stream, and using a manually indexed loop (with getChild) is slightly faster.