[GHC] #6135: Unboxed Booleans

GHC cvs-ghc at haskell.org
Thu Jan 24 14:08:29 CET 2013


#6135: Unboxed Booleans
---------------------------------+------------------------------------------
    Reporter:  benl              |       Owner:  jstolarek       
        Type:  feature request   |      Status:  new             
    Priority:  normal            |   Milestone:  7.8.1           
   Component:  Compiler          |     Version:  7.4.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:  #605              |  
---------------------------------+------------------------------------------

Comment(by simonmar):

 I agree with Simon, I think we already got a lot of the benefit to be had
 here from pointer tagging.  Perhaps for enums larger than the threshold (3
 or 7 for 32-bit or 64-bit respectively) we should be unboxing them in
 worker/wrapper.  It wouldn't be hard to write some examples by hand and
 measure the difference between using enums and `Int#`.

 I would like to see the simplification I mentioned above - changing the
 comparison primops to return `Int#` rather than `Bool` - and I believe
 that would lead to more optimisations later.  At the least it would expose
 the magic `tagToEnum#` that arises from these primops to the simplifier,
 where it could be optimised away.

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



More information about the ghc-tickets mailing list