- or download this
my $t;
...
for ^$iterations { c($_ %% 2 ?? 1 !! 2) };
say "multi: {now - $t}";
}
- or download this
1 calls
regular: 0.00630924
...
1000000 calls
regular: 4.45541020
multi: 24.2623499
- or download this
my $t;
...
for ^$iterations { c($_ %% 2 ?? A !! B) };
say "multi: {now - $t}";
}
- or download this
1 calls
regular: 0.00321471
...
1000000 calls
regular: 5.6755910
multi: 5.946978