[GHC] #7923: Optimization for takeMVar/putMVar when MVar left empty

GHC ghc-devs at haskell.org
Sat Jun 15 14:48:49 CEST 2013


#7923: Optimization for takeMVar/putMVar when MVar left empty
---------------------------------+------------------------------------------
    Reporter:  ezyang            |       Owner:  ezyang                 
        Type:  task              |      Status:  patch                  
    Priority:  normal            |   Milestone:                         
   Component:  Runtime System    |     Version:  7.7                    
    Keywords:                    |          Os:  Unknown/Multiple       
Architecture:  Unknown/Multiple  |     Failure:  Runtime performance bug
  Difficulty:  Unknown           |    Testcase:                         
   Blockedby:                    |    Blocking:                         
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by ian@…):

 commit 5d9e686c30a00be08a04d9fd1c860994153a1f7a
 {{{
 Author: Ian Lynagh <ian at well-typed.com>
 Date:   Sat Jun 15 13:19:21 2013 +0100

     Optimization for takeMVar/putMVar when MVar left empty; fixes #7923

     We only need to apply the write barrier to an MVar when it acquires
     a reference to live data; when the MVar is left empty in the case
     of a takeMVar/putMVar, we can save a memory reference.

     Patch from Edward Z. Yang.

  rts/PrimOps.cmm |   49 +++++++++++++++++++++++++++++--------------------
  1 files changed, 29 insertions(+), 20 deletions(-)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7923#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list