Lower than C?

bearophile bearophileHUGS at lycos.com
Sun Dec 9 05:24:52 PST 2007


Adolf Mathias:

> I beg to disagree -  The Ocaml and Clean compilers are pretty much on par with gcc
> (http://shootout.alioth.debian.org), and these languages are pretty high level.

You probably mean this page:
http://shootout.alioth.debian.org/sandbox/benchmark.php?test=all&lang=all

It shows that a really simple C compiler can be even slower than Clean, that is indeed an efficient language, you can see a little example here, where Clean is (mysteriously? Does someone knows why?) faster than C:

http://shootout.alioth.debian.org/sandbox/benchmark.php?test=sumcol&lang=all

Ocaml is indeed quite fast, and beside normal compilation you can use it on a VM too, and even in an interactive shell like Python that's really useful. And Ocaml has compile-time pattern matching that can be useful. So if you accept a little speed reduction, you can gain some expressivity (Ocalm (ML-style) type system is probably quite better than C-like type system).

Bye,
bearophile



More information about the Digitalmars-d mailing list