Le Thursday 25 Aug 2011 à 12:25:49 (+0200), Pierre-Alexandre Voye a écrit :
> I have a stupid question : I wonder if it would not be a bad idea that
> Ocaml output C code and let gcc do its work, so compile code with good
> performances in a lot of architecture ? Gcc is able to do
> autovectorization (SSE, MMX, Larabee in the futur, etc...), very
> specific processor optimization, etc...
> But maybe it's a stupid idea ?
I do not think it's a stupid idea. I've been quite stunned by how the
Mercury compiler does it (using cpp macros and so-called virtual
registers in C code). It's likely a pain however, and most compilers
I've seen using the "compile to C" approach usually use Boehm's GC, so
it may be quite a pain to adapt the OCaml runtime to it. However, gcc
isn't the golden bullet for everything. It definitely sucks with the
SIMD instruction set.
--
Guillaume Yziquel
--
Caml-list mailing list. Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs