From 221597bd79054af47d3d5866d74a03ee9d7cd6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Mon, 11 Oct 2021 10:33:43 +0800 Subject: [PATCH 1/2] When profiling, don't add cost centres in Data.Binary.Get This change speeds up profiling by an order of magnitude. Without it, the >>= function for Get dominates runtime completely during profiling. --- src/runtime/haskell/Data/Binary/Get.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runtime/haskell/Data/Binary/Get.hs b/src/runtime/haskell/Data/Binary/Get.hs index 54f17ae95..07a3db40e 100644 --- a/src/runtime/haskell/Data/Binary/Get.hs +++ b/src/runtime/haskell/Data/Binary/Get.hs @@ -1,4 +1,6 @@ {-# LANGUAGE CPP, MagicHash #-} +-- This module makes profiling a lot slower +{-# OPTIONS_GHC -fno-prof-auto #-} -- for unboxed shifts ----------------------------------------------------------------------------- From b0b2a06f3b3485e41ebfb66c2d4ebbd5dd8e6119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Tue, 3 May 2022 13:10:29 +0800 Subject: [PATCH 2/2] Improve comment --- src/runtime/haskell/Data/Binary/Get.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/haskell/Data/Binary/Get.hs b/src/runtime/haskell/Data/Binary/Get.hs index 07a3db40e..895789061 100644 --- a/src/runtime/haskell/Data/Binary/Get.hs +++ b/src/runtime/haskell/Data/Binary/Get.hs @@ -1,5 +1,5 @@ {-# LANGUAGE CPP, MagicHash #-} --- This module makes profiling a lot slower +-- This module makes profiling a lot slower, so don't add automatic cost centres {-# OPTIONS_GHC -fno-prof-auto #-} -- for unboxed shifts