- or download this
# llil.pl
# Example run: perl llil.pl tt1.txt tt2.txt >oo1.tmp
...
warn "sort + output : $taken2 secs\n";
warn "total : $taken secs\n";
- or download this
sort { $href->{$b} <=> $href->{$a} || $a cmp $b } keys %{$href}
- or download this
// llil.cpp. C++ 11 version of Perl llil.pl.
// g++ compile on Linux:
...
return 0;
}
- or download this
# gen-llil.pl
# Crude program to generate a big LLiL test file to use in benchmarks
...
print "generating test file '$outfile' with count '$count'\n";
create_test_file($outfile, $count, $wordlen);
print "file size=", -s $outfile, "\n";
- or download this
perl gen-llil.pl big1.txt 200 3
perl gen-llil.pl big2.txt 200 3
perl gen-llil.pl big3.txt 200 3
- or download this
perl llil.pl big1.txt big2.txt big3.txt >perl.tmp
- or download this
llil big1.txt big2.txt big3.txt >cpp.tmp
- or download this
diff perl.tmp cpp.tmp
- or download this
> perl llil.pl big1.txt big2.txt big3.txt >perl.tmp
llil start
get_properties : 11 secs
sort + output : 74 secs
total : 85 secs
- or download this
> llil big1.txt big2.txt big3.txt >cpp.tmp
llil start (sort version)
get_properties : 9 secs
sort + output : 7 secs
total : 16 secs
- or download this
> diff cpp.tmp perl.tmp