[vector] #74: expose the bytearray in primitive vectors

vector vector at projects.haskell.org
Fri Jan 20 04:04:25 GMT 2012


#74: expose the bytearray in primitive vectors
------------------------+---------------------------------------------------
Reporter:  choener      |        Owner:     
    Type:  enhancement  |       Status:  new
Priority:  minor        |    Milestone:     
 Version:               |   Resolution:     
Keywords:               |  
------------------------+---------------------------------------------------

Comment(by choener):

 Hi,

 I am currently playing around with it but what llvm does gives me a
 headache ;-)

 It basically seems that all zero offsets are kept. And unfortunately I am
 doing stuff that in core looks like this:

 {{{
 let {
    y11_a84Z
    y11_a84Z =
      +#
        (indexIntArray#
           rb2_X870
           a3_sett)
        (indexIntArray#
           rb3_X86w
           (+#
              (*#
                 (+#
                    (*#
                       (indexIntArray#
                          rb1_a86V
                          (+#
                             (*#
                                sc5_snX0
                                y6_a87h)
                             (indexIntArray#
                                rb_a840
                                sc3_snWY)))
                       y9_a89b)
                    sc6_snX2)
                 y10_X8jw)
              (indexIntArray#
                 rb_a840
                 (-#
                    sc3_snWY
                    1)))) } in

 }}}

 where it starts to make a difference if I add or subtract some constants.

 One option could be to have not "expose" but "hide" which constructs
 vectors from bytearrays directly but I have to think more about it.
 Otherwise I agree that it would be much nicer to have ghc/llvm do the
 zero-offset removal.

-- 
Ticket URL: <http://trac.haskell.org/vector/ticket/74#comment:3>
vector <http://trac.haskell.org/vector>
Package vector


More information about the vector mailing list