[wg-camlp4] benchmarks

Thomas Gazagnaire thomas at ocamlpro.com
Thu Feb 7 20:39:39 GMT 2013


Hi all,

In my opinion as a *user* of camlp4, the main pitfall that I can see (and which has not yet been addressed) is that it is really slowing down the compilation process. To improve that, the usual methods are:
1. to use native syntax extensions
2. to statically link the syntax extensions into one preprocessor binary

Currently, 1. is very broken  (natdynlink doesn't work on all platforms and most of the syntax packages do not install their native libraries anyway) and 2. is not very flexible because of lack of tooling, and so very rarely used.

So, if we decide to switch to a new preprocessing tool, I guess it's important to get these hings right:
* it should be easy enough for external tools to statically build pre-processors.
* the new preprocessor should be benchmarked on realistic examples to see how much time we gain vs. camlp4. A good example might be mirage which is using only pa_lwt and cstruct (or xen-api which is using only ocaml-rpc, or core but that maybe too much syntax in one go).

Best,
Thomas
PS: I'm not speaking about the bootstraping time of camlp4, which is indeed very painful, but which doesn't really affect the end-user once the compiler is installed.


More information about the wg-camlp4 mailing list