
#13360: Add a flag to enable inferring HasCallStack constraints -------------------------------------+------------------------------------- Reporter: gridaphobe | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by saurabhnanda):
I did a couple ​microbenchmarks a while ago.
Thanks for sharing the benchmarks. They seem to be reporting a 50-250% slowdown with HasCallstack. My hunch is that the slowdown is linear wrt the depth of the call-stack. Will need to do some benchmarking to be sure of this. Do you know what the underlying data-structure for storing the call-stack is? IIUC, callstacks have been implemented as an extra implicit argument, and the slowdown shouldn't be more than adding a regular argument (say, a global configuration record) to a regular function. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13360#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler