> For example, C2 might behave differently than Graal and who knows what the future brings.

Yes, the GraalVM compiler is more aggressive on some optimizations that can be especially helpful with streams. Here are numbers from my machine (using ops/s, so higher is better!):

C2 (on Java(TM) SE Runtime Environment (build 1.8.0_251-b08)):

Benchmark (warmup) Mode Cnt Score Error Units
MyBenchmark.collectionsDeadCode true thrpt 10 2.179 ± 0.070 ops/s
MyBenchmark.collectionsDeadCode false thrpt 10 1.640 ± 0.055 ops/s
MyBenchmark.coollectionsBlackhole true thrpt 10 1.661 ± 0.109 ops/s
MyBenchmark.coollectionsBlackhole false thrpt 10 1.571 ± 0.062 ops/s
MyBenchmark.loopBlackhole true thrpt 10 1.829 ± 0.077 ops/s
MyBenchmark.loopBlackhole false thrpt 10 1.855 ± 0.062 ops/s
MyBenchmark.loopBlackholeOnly true thrpt 10 19.775 ± 0.184 ops/s
MyBenchmark.loopBlackholeOnly false thrpt 10 20.213 ± 0.491 ops/s
MyBenchmark.loopDeadCode true thrpt 10 2.022 ± 0.057 ops/s
MyBenchmark.loopDeadCode false thrpt 10 1.990 ± 0.074 ops/s

GraalVM Community Edition (current master, close to yesterday's 20.1 release, JDK 8):

Benchmark (warmup) Mode Cnt Score Error Units
MyBenchmark.collectionsDeadCode true thrpt 10 3.151 ± 0.118 ops/s
MyBenchmark.collectionsDeadCode false thrpt 10 2.790 ± 0.053 ops/s
MyBenchmark.coollectionsBlackhole true thrpt 10 2.713 ± 0.137 ops/s
MyBenchmark.coollectionsBlackhole false thrpt 10 2.488 ± 0.031 ops/s
MyBenchmark.loopBlackhole true thrpt 10 2.862 ± 0.073 ops/s
MyBenchmark.loopBlackhole false thrpt 10 2.835 ± 0.043 ops/s
MyBenchmark.loopBlackholeOnly true thrpt 10 24.396 ± 1.278 ops/s
MyBenchmark.loopBlackholeOnly false thrpt 10 24.103 ± 0.957 ops/s
MyBenchmark.loopDeadCode true thrpt 10 3.235 ± 0.097 ops/s
MyBenchmark.loopDeadCode false thrpt 10 3.205 ± 0.168 ops/s

GraalVM Enterprise Edition (current master, close to 20.1, JDK 8):

Benchmark (warmup) Mode Cnt Score Error Units
MyBenchmark.collectionsDeadCode true thrpt 10 3.748 ± 0.046 ops/s
MyBenchmark.collectionsDeadCode false thrpt 10 2.879 ± 0.042 ops/s
MyBenchmark.coollectionsBlackhole true thrpt 10 2.792 ± 0.059 ops/s
MyBenchmark.coollectionsBlackhole false thrpt 10 2.479 ± 0.040 ops/s
MyBenchmark.loopBlackhole true thrpt 10 3.070 ± 0.046 ops/s
MyBenchmark.loopBlackhole false thrpt 10 3.077 ± 0.057 ops/s
MyBenchmark.loopBlackholeOnly true thrpt 10 25.200 ± 0.760 ops/s
MyBenchmark.loopBlackholeOnly false thrpt 10 25.752 ± 0.481 ops/s
MyBenchmark.loopDeadCode true thrpt 10 3.812 ± 0.161 ops/s
MyBenchmark.loopDeadCode false thrpt 10 3.909 ± 0.109 ops/s

Amusingly, on the OP's benchmark GraalVM also does better than C2, and it somehow (I haven't tried to analyze this yet) makes the serial stream version as fast as the parallel one:

C2:

Benchmark Mode Cnt Score Error Units
MyBenchmark.originalParallelStream thrpt 10 2.547 ± 0.336 ops/s
MyBenchmark.originalSerialStream thrpt 10 1.719 ± 0.041 ops/s

GraalVM Community Edition:

Benchmark Mode Cnt Score Error Units
MyBenchmark.originalParallelStream thrpt 10 2.809 ± 0.141 ops/s
MyBenchmark.originalSerialStream thrpt 10 2.868 ± 0.090 ops/s

(I work in the GraalVM compiler team at Oracle Labs, I don't speak for Oracle, I'm not claiming anything about whether this is a good or bad benchmark, etc.)