
#9696: readRawBufferPtr and writeRawBufferPtr allocate memory -------------------------------------+------------------------------------- Reporter: mergeconflict | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.8.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: x86_64 Type of failure: Runtime | (amd64) performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Just to say, on the original problem, eliminating allocation from inner loops is a Good Goal. Sometimes it's hard (after all, GHC works largely with immutable values) but sometimes it's really quite accidental and easily eliminated. I don't have time to dig in here; but inlining this `throwErrNo` thing might be helpful. On the other hand it may duplicate a lot of code; maybe it's worth asking ''why'' it is allocating and seeing what might avoid that need. E.g. if it has a higher order argument, perhaps specialising it for the various distinct call sites might help. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9696#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler