[rescue] [geeks] Mozilla and Java

Peter Corlett abuse at cabal.org.uk
Mon May 3 03:50:21 CDT 2004

Charles Shannon Hendrix <shannon at widomaker.com> wrote:
> I think it was stupid to rewrite in Java in the first place, but at the
> same time I don't see why Java should be that much worse than Perl.

Java compiles to a bytecode that's at the level of machine code. This
machine code may or may not be optimal for whatever JVM has to ultimately
run it. More importantly, all of the really important primitives like
hashes, lists, regular expressions, string-handling and so on are written in
this machine and have to be interpreted.

Perl compiles to a parse tree that it can tune how it likes. Perl doesn't
have to serialise this tree for later execution. The same Perl executable
that built the tree gets to run it. Also, the primitives are written in
highly-tuned C - i.e. native code.

Unsurprisingly, Perl should wipe the floor with Java on text manipulation.

PGP key ID E85DC776 - finger abuse at mooli.org.uk for full key

More information about the rescue mailing list