#11795: Performance issues with replicateM_ -------------------------------------+------------------------------------- Reporter: snoyberg | Owner: snoyberg Type: bug | Status: merge Priority: normal | Milestone: 8.0.1 Component: libraries/base | Version: 7.10.3 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Runtime | (amd64) performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2086 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"c4a7520ef3a0b5e0e33d66ae1d628af93e0d7590/ghc" c4a7520e/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="c4a7520ef3a0b5e0e33d66ae1d628af93e0d7590" Provide an optimized replicateM_ implementation #11795 In my testing, the worker/wrapper transformation applied here significantly decreases the number of allocations performed when using replicateM_. Additionally, this version of the function behaves correctly for negative numbers (namely, it will behave the same as replicateM_ 0, which is what previous versions of base have done). Reviewers: bgamari, simonpj, hvr, austin Reviewed By: bgamari, simonpj, austin Subscribers: nomeata, simonpj, mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2086 GHC Trac Issues: #11795 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11795#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler