Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] speed
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Chet Murthy <chet@w...>
Subject: Re: [Caml-list] speed

Not to contradict Xavier, because in essence, he is right -- Caml is
indeed far faster than Java on any realistic applications in almost
any area I have ever bothered to try -- but the story as to Java is
actually rather complicated.

(1) different JDKs exhibit remarkably different results on real-world
examples, as their implementors have different backgrounds.  I
remember that the first JITs all did great on integer and
floating-point loops, and that was _it_ -- the rest of the time, they
were often slower than just a hack like inlining interpreter
code-segments.  This is just a human thing.

(2) different JDKs from different manufacturers exhibit different
behaviours.  E.g., I find that the Sunsoft JDKs on Solaris are a lot
faster than the Javasoft JDKs on Solaris.  I also find (no, I'm not
shilling for IBM) that IBM's JDK on Linux is a lot faster than
Javasoft's.  There are, again, social issues involved here, which I am
not sure I am at liberty to discuss.

That said, by and large I find that when you don't go near issues of
allocation and interprocedural optimization, Java is and can be as
fast as Caml.  *However*, when you _do_ go near those things, e.g. if
you do anything I/O or string-processing-intensive, well,

  go get a rocking chair, 'cos you're gonna have a looong wait.


P.S. Or get thee to a caml and get it done.  *grin*
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: