
#8027: Adding one call to getNumCapabilities triggers performance nose dive (6X slowdown) ---------------------------------+------------------------------------------ Reporter: rrnewton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.6.3 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Runtime performance bug Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Comment(by ezyang): What happens when you inline getNumCapabilities? It's a very simple function: {{{ getNumCapabilities :: IO Int getNumCapabilities = do n <- peek enabled_capabilities return (fromIntegral n) foreign import ccall "&enabled_capabilities" enabled_capabilities :: Ptr CInt }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/8027#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler