I’m new to dune and experiencing some 20% slowdown with the executables built with dune compared the ones produced with my good old Makefile where I specify options -no_assert -unsafe -inline 100. I tried to do the same with flags in my dune configuration:
However, I can see with dune build --verbose that many other options are passed to the compiler (like -g) by default, which might (or not?) lead to a slow-down. Is there any way to optimize dune for performance in this respect?
Have you tried building your executables in “release” mode (dune build --profile release) ? Otherwise Dune will build using -opaque which optimizes compilation time but disables cross-module inlining.
Thank you for your suggestion. Unfortunately, I didn’t notice any runtime difference with “–profile release” (nor did I with the addition of “-g” in the Makefile, which did not noticeably slow down my executables, so “-g” is probably not the culprit).