Things that work better in Caml

Things that work better in Caml Light

Are the input languages identical?

Not quite, but you can program for quite a while before noticing the differences (unless you use the most advanced features of Caml, of course). Actually, you'll notice much earlier the differences between the Caml library and the Caml Light library. Overall, porting from Caml to Caml Light is relatively easy.

Is the performance comparable?

Caml produces native machine code, while Caml Light produces bytecode for an abstract machine, which is interpreted later, hence Caml Light should be much slower than Caml. But Caml Light has a more efficient execution model, and above all a much better garbage collector: Caml routinely spends more than half the time in garbage collection; with Caml Light, this goes down to 10% or less. Overall, Caml Light is slightly faster. This depends a lot on your application (Caml is faster than Caml Light on raw integer arithmetic, but slower on function calls) and on your machine (Caml works better on CISCs, Caml Light really shines on RISCs).

Caml - Cristal - Homepages - Contact Web Administrator - Last modified: 1997/12/15