News for hackers. Stuff that matters.
Re:Extension Points, or how OCaml is becoming more like Lisp by edwintorok on Friday May 09, 2014 @03:45AM (#7719817)
It would be interesting to see how the speed of -ppx extensions compares to camlp4. If camlp4 is run in bytecode mode it can be quite slow, I looked at 'top' while running 'opam install core' at some point, and most of the time was taken by camlp4. Since -ppx extensions are supposed to run natively (without requiring natdynlink support even) I would expect them to be faster.

Has anyone done any comparisons?

Re:Extension Points, or how OCaml is becoming more like Lisp by avsm on Friday May 09, 2014 @05:29AM (#7720042)
There are pros and cons to not using dynlink, since it requires another fork (although this can be avoided using a custom compiler driver).

Avoiding bytecode in the compilation toolchain is really the main benefit though. This was originally due to the fact that only the bytecode backend supported dynamic loading (which is used by camlp4 to load the syntax extension modules). When native dynamic code loading was added to OCaml circa 2009 or so, the build systems around camlp4 never really took up the change to switch to the much faster native code version. All the ppx extensions emerging now are at least guaranteed to have a native code version on all the major supported architectures (x86, ARM, Sparc, PPC)