[GHC] #8256: adding locality levels to prefetch# and friends

GHC ghc-devs at haskell.org
Thu Sep 19 21:08:27 CEST 2013


#8256: adding locality levels to prefetch# and friends
-------------------------------------+------------------------------------
        Reporter:  carter            |            Owner:  carter
            Type:  task              |           Status:  patch
        Priority:  normal            |        Milestone:  7.8.1
       Component:  Compiler          |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:  #8252 ,#8107
-------------------------------------+------------------------------------

Comment (by carter):

 its worth noting that the "right" benchmark for prefetch would be
 something like having two large arrays, one of which is  indices into the
 other array, chosen randomly.  the benchmark would be comparing a naive
 random lookup vs a prefetched one.

 (the idea being that the test fails if prefetch isn't faster than naive).

 i'll cook up  this example some other time. but would be the only sane way
 to benchmark if prefetch is working or not! (because prefetch on any valid
 memory address will not change the naive perf correctness).

 NB: the one way prefetching could interact with correctness in an
 unrelated to performance way, would be in relation to all those various
 side channel timing based security issues. proper mitigation would
 probably require ghc also supporting streaming reads and writes, in
 addition to prefetch.

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



More information about the ghc-tickets mailing list