diff options
Diffstat (limited to 'run/benchmark')
-rw-r--r-- | run/benchmark | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/run/benchmark b/run/benchmark new file mode 100644 index 0000000..4c20e0e --- /dev/null +++ b/run/benchmark @@ -0,0 +1,20 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +my @cmd = ( + q{date}, + q{perl5.32.0 -le 'print "Hello world!"'}, + q{python3.7 -c 'print("Hello world!")'}, + q{ruby26 -e 'puts "Hello world!"'}, +); +my @res; +for (1..3) { + @res = (); + for (reverse @cmd) { + (my $q = $_) =~ s/'/'"'"'/g; + push @res, "\$ time $_\n" . `bash -c 'time $q' 2>&1`; + } +} +print join("\n", reverse @res); |