Skip to content

Instantly share code, notes, and snippets.

@japhb
Created June 1, 2016 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save japhb/6d263ce206208b20eb357581d187b40d to your computer and use it in GitHub Desktop.
Save japhb/6d263ce206208b20eb357581d187b40d to your computer and use it in GitHub Desktop.
#!/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