Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
12M print statements in Perl
$ cat generate.pl
#! /usr/bin/env perl
use Modern::Perl '2015';
###
say '#! /usr/bin/env perl';
for (1..12_000_000) {
say 'print "hello world!\n";'
}
$ perl ./generate.pl > 12M.pl
$ time perl ./12M.pl > out
real 9m11.857s
user 2m0.406s
sys 3m41.608s
$ wc -l *
12000001 12M.pl
8 generate.pl
12000000 out
24000009 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment