[GHC] #14882: memchr#

GHC ghc-devs at haskell.org
Fri Mar 2 23:29:15 UTC 2018


#14882: memchr#
-------------------------------------+-------------------------------------
           Reporter:  andrewthad     |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 It would be neat if we had a primitive for calling memchr on a ByteArray#.
 Something like this:

 {{{
 memchr :: ByteArray# -> Word# -> Int# -> Int# -> Int#
 }}}

 The integer arguments are a starting index and length.  I have a hunch
 that copyByteArray# and friends are just wrappers for memcpy that somehow
 prohibit the array from being moved by the GC while they are running. I
 would be happy to  try to implement memchr#  if it seems like an alright
 idea.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14882>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list