array => sub {
my @list = @input;
@list[@input] = @input;
Compare(\@list,\@output) or die "@list" if DO_CHECK;
},
When added, outputs:
Rate johngg Tux pryrt choroba0 choroba choroba2 grepfirs
+t sortfirst Eily array
johngg 6047/s -- -26% -36% -57% -67% -69% -70
+% -73% -83% -93%
Tux 8142/s 35% -- -14% -42% -55% -58% -60
+% -64% -77% -90%
pryrt 9471/s 57% 16% -- -32% -48% -51% -54
+% -58% -73% -89%
choroba0 13922/s 130% 71% 47% -- -23% -28% -32
+% -38% -61% -83%
choroba 18181/s 201% 123% 92% 31% -- -6% -11
+% -19% -49% -78%
choroba2 19424/s 221% 139% 105% 40% 7% -- -5
+% -13% -45% -77%
grepfirst 20451/s 238% 151% 116% 47% 12% 5% -
+- -8% -42% -75%
sortfirst 22333/s 269% 174% 136% 60% 23% 15% 9
+% -- -37% -73%
Eily 35540/s 488% 337% 275% 155% 95% 83% 74
+% 59% -- -57%
array 83332/s 1278% 923% 780% 499% 358% 329% 307
+% 273% 134% --
It passes your test case, so for (some) perl golfs, it is considered correct :)