#! /usr/bin/perl use autodie; my %LISP = ("sbcl" => "SBCL", "ccl" => "Clozure CL", "ecl" => "ECL", "clisp" => "GNU CLisp", "cmucl" => "CMU CL", "abcl" => "ABCL"); my %LABEL = ("perl" => "Perl", "python" => "Python", "c.tcc" => "Tiny C", "c.gcc" => "GCC", "shell.dash" => "dash", "shell.bash" => "GNU Bash", "shell.zsh" => "Z Shell"); for my $l (keys %LISP) { $LABEL{"runlisp.$l"} = $LISP{$l}; } { my %d; sub timing ($) { my ($f) = @_; return $d{$f} if exists $d{$f}; open my $fh, "<", "$f.bench"; (my $data = readline $fh) =~ s/^.* elapsed = ([0-9.]+)s.*$/$1/; return $d{$f} = $data; } } print < lisp "Lisp system" "\\\\texttt{cl-launch}" "\\\\texttt{runlisp} (vanilla image)" "\\\\texttt{runlisp} (custom image)" EOF for my $l (sort keys %LISP) { printf "\"%s\" %.4f %.4f %.4f\n", $LISP{$l}, timing("cl-launch.$l"), timing("runlisp-noimage.$l"), timing("runlisp.$l"); } print "\n\n"; print < interp EOF for my $i ("runlisp.ccl", "runlisp.clisp", "runlisp.cmucl", "runlisp.sbcl", "perl", "python", "shell.dash", "shell.bash", "shell.zsh", "c.tcc", "c.gcc") { printf "\"%s\" %.4f\n", $LABEL{$i}, timing $i; }