[GHC] #14657: Quadratic constructor tag allocation

#14657: Quadratic constructor tag allocation -------------------------------------+------------------------------------- Reporter: niteria | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | performance bug Test Case: | Blocked By: genManyConstructors | Blocking: | Related Tickets: Differential Rev(s): phab:D4289 | Wiki Page: -------------------------------------+------------------------------------- With a large data type like: {{{ data A = A0 | A0001 | A0002 ... | A9999 }}} GHC spends a lot of time allocating constructor tags. It accounts for half of allocations for large data types like this. The hot piece of code is in `mkDataCon`: {{{ tag = assoc "mkDataCon" (tyConDataCons rep_tycon `zip` [fIRST_TAG..]) con }}} Previous discussion: https://mail.haskell.org/pipermail/ghc-devs/2017-October/014974.html -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14657 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14657: Quadratic constructor tag allocation -------------------------------------+------------------------------------- Reporter: niteria | Owner: niteria Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: performance bug | genManyConstructors Blocked By: | Blocking: Related Tickets: | Differential Rev(s): phab:D4289 Wiki Page: | -------------------------------------+------------------------------------- Changes (by niteria): * owner: (none) => niteria -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14657#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14657: Quadratic constructor tag allocation
-------------------------------------+-------------------------------------
Reporter: niteria | Owner: niteria
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version:
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Compile-time | Test Case:
performance bug | genManyConstructors
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): phab:D4289
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Bartosz Nitka

#14657: Quadratic constructor tag allocation -------------------------------------+------------------------------------- Reporter: niteria | Owner: niteria Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: performance bug | genManyConstructors Blocked By: | Blocking: Related Tickets: | Differential Rev(s): phab:D4289 Wiki Page: | -------------------------------------+------------------------------------- Changes (by niteria): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14657#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC