On 8/26/12 11:05 AM, Gabriel Scherer
wrote:
Hi Gabriel,
Sorry for the noise, it turns out that I upgraded my ocalmfind,
and forget to modify findlib.conf.
ocamlfind still picks 'ocamlc' instead of 'ocamlc.opt'.
There's a huge performance difference(10x) between ocamlc.opt
and ocamlc.
Thanks!
You could try compiling a native OCaml compiler
executable with profiling option (-p) (setting that up might be a
pain, though).
Before that you could try to only typecheck the file (option "-i")
to know whether it's the type-checking or code generation that is
problematic. (-i causes type printing as well, so for very large
types that are internally shared it can be its own source of
slowness)
If it was in code generation, that would most likely only occur
during when compiling to native code. Have you noticed the
performance bottleneck with compilation to bytecode as well?
(Of course using the natively-compiled versions of your compilers
will also speed up performance, but if your generated code hits
one of the source of exponential behavior of the compiler you're
out of luck anyway.)