a perl5 to Java compiler - first benchmark
I've written a small performance test. And it is not bad!
First perl:
$ time perl misc/benchmark/benchmark_lexical.pl
done 64000000
real 0m3.964s
user 0m3.963s
sys 0m0.004s
And then Perl-in-Java:
$ touch Test.class ; rm Test.class ; perl perlito5.pl -Isrc5/lib -I. -It -Cjava misc/benchmark/benchmark_lexical.pl > Main.java ; javac Main.java ; time java Main
done 64000000
real 0m0.840s
user 0m0.584s
sys 0m0.302s
[EDIT] broken link
It's unfair - you only measure running the compiled code in Java, but you include compilation in Perl.
Trying again with compilation included:
$ time perl misc/Java/benchmark.pl
done 64000000
real 0m9.688s
user 0m9.617s
sys 0m0.017s
$ time ( touch Test.class ; rm Test.class ; perl perlito5.pl -Isrc5/lib -I. -It -Cjava misc/Java/benchmark.pl > Test.java ; javac Test.java ; java Test )
done 64000000
real 0m3.069s
user 0m4.092s
sys 0m0.277s
Java with compilation included is still faster!
(note: I'm testing on a different computer)