Skip to content

Instantly share code, notes, and snippets.

@japhb
Created Jun 1, 2016
Embed
What would you like to do?
#!/usr/bin/env perl6
sub MAIN($before, $after) {
my $pct = 100 * ($before - $after) / $before;
say abs($pct).fmt: "%9.2f%% {$pct < 0 ?? "more" !! "less"} time";
say $pct < 0 ?? ($after / $before).fmt("%9.2f times slower")
!! ($before / $after).fmt("%9.2f times faster");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment