[GHC] #6135: Unboxed Booleans

GHC cvs-ghc at haskell.org
Thu Apr 11 15:10:49 CEST 2013


#6135: Unboxed Booleans
---------------------------------+------------------------------------------
    Reporter:  benl              |       Owner:  jstolarek       
        Type:  feature request   |      Status:  patch           
    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 jstolarek):

 Wiki page is up to date and shows one example benchmark where the code is
 about 3 times faster thanks to the new primops. I also have an idea for
 one more benchmark, but I'm not yet sure whether it'll give good results.

 Changing the type of dataToTag# and tagToEnum# to maintain consistency
 sounds like a good idea. I can take care of that, once I'm done with
 comparison primops.

 At the moment I hit a rather serious problem (or so it seems) - changing
 the return type of comparisons breaks automatic deriving of instances for
 Ord and Eq. I'm yet to figure out how to fix that.

 Right now I would insist to decide what names should the wrappers have.
 There will be lots of changes needed and I would like to avoid going
 through this twice. My proposals are:

 {{{
     gtCharBool#, geCharBool#, eqCharBool#,
     neCharBool#, ltCharBool#, leCharBool#,

     (>$#), (>=$#), (==$#), (/=$#), (<$#), (<=$#),

     gtWordBool#, geWordBool#, eqWordBool#,
     neWordBool#, ltWordBool#, leWordBool#,

     (>$##), (>=$##), (==$##), (/=$##), (<$##), (<=$##),

     gtFloatBool#, geFloatBool#, eqFloatBool#,
     neFloatBool#, ltFloatBool#, leFloatBool#,

     gtAddrBool#, geAddrBool#, eqAddrBool#,
     neAddrBool#, ltAddrBool#, leAddrBool#
 }}}

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



More information about the ghc-tickets mailing list