[GHC] #14727: Unboxed sum performance surprisingly poor

GHC ghc-devs at haskell.org
Sat Jan 27 06:48:48 UTC 2018


#14727: Unboxed sum performance surprisingly poor
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:  UnboxedSums
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Replying to [comment:1 osa1]:
 > I'd make sure `lookup` is inlined, in which case allocations should be
 reduced.

 It is inlined. I'll have to look at allocations. Of course, it's somewhat
 possible that performance goes down ''because'' there's less allocation,
 if we're unknowingly relying on the GC to improve memory layout.

 > OTOH you use one more register to return two values in `lookup#` instead
 of one as before so that may make some things worse.
 >
 > It'd be helpful to see benchmark code's Cmm for both versions (with
 `lookup` inlined in the unboxed sums version).

 I'm not sure how much you're likely to get from a Criterion benchmark. Is
 there a specific thing you'd like me to try dumping?

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


More information about the ghc-tickets mailing list