@Benchmark public void gatherBase0(Blackhole bh) { $type$[] as = fa.apply(size); int[] is = fs.apply(size); $type$[] rs = fr.apply(size); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < as.length; i++) { int ix = 0 + is[i]; rs[i] = as[ix]; } } bh.consume(rs); } void gather(int window, Blackhole bh) { $type$[] as = fa.apply(size); int[] is = fs.apply(size); $type$[] rs = fr.apply(size); for (int ic = 0; ic < INVOC_COUNT; ic++) { for (int i = 0; i < as.length; i += window) { for (int j = 0; j < window; j++) { int ix = i + is[i + j]; rs[i + j] = as[ix]; } } } bh.consume(rs); } @Benchmark public void gather064(Blackhole bh) { int window = 64 / $Wideboxtype$.SIZE; gather(window, bh); } @Benchmark public void gather128(Blackhole bh) { int window = 128 / $Wideboxtype$.SIZE; gather(window, bh); } @Benchmark public void gather256(Blackhole bh) { int window = 256 / $Wideboxtype$.SIZE; gather(window, bh); } @Benchmark public void gather512(Blackhole bh) { int window = 512 / $Wideboxtype$.SIZE; gather(window, bh); }