aboutsummaryrefslogtreecommitdiff
path: root/run/benchmark
blob: 4c20e0e0b597ba745ef373cb270fa97739f46619 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);