From d514585bbb54482ee62070bc86a7447a657afaee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 6 May 2021 14:30:32 +0200 Subject: First commit --- run/benchmark | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 run/benchmark (limited to 'run/benchmark') 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); -- cgit v1.2.3