From 88ce4f5e8a2706c28bde0794932cba17cb816286 Mon Sep 17 00:00:00 2001 From: Alexander Biehl Date: Mon, 27 Aug 2018 15:50:37 +0200 Subject: [PATCH] More conservative SCC tagging for Haskell libraries `all-functions` corresponds to `-fprof-auto` which places an SCC on every binding. It is well known that SCCs hinder GHC from doing its optimization magic and really slows down profiled code to a point where the profiling reports are completely skewed towards things that were completely optimized away in production settings. Concretely this shows up with things like lenses which do not carry runtime overhead when properly simplified. `exported-functions` corresponds to GHCs `-fprof-auto-exported` which doesn't put SCCs on `INLINE`d code and in turn doesn't influence simplification of this basic but important stuff. --- pkgs/development/haskell-modules/generic-builder.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index a0dd2a305f8..cdbf119af8c 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -26,7 +26,7 @@ in , editedCabalFile ? null , enableLibraryProfiling ? true , enableExecutableProfiling ? false -, profilingDetail ? "all-functions" +, profilingDetail ? "exported-functions" # TODO enable shared libs for cross-compiling , enableSharedExecutables ? false , enableSharedLibraries ? (ghc.enableShared or false)