[GHC] #11822: Pattern match checker exceeded (2000000) iterations

GHC ghc-devs at haskell.org
Fri Oct 21 15:32:32 UTC 2016


#11822: Pattern match checker exceeded (2000000) iterations
-------------------------------------+-------------------------------------
        Reporter:  j.waldmann        |                Owner:  gkaracha
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1-rc3
      Resolution:                    |             Keywords:
                                     |  PatternMatchWarnings
Operating System:  Unknown/Multiple  |         Architecture:  x86_64
 Type of failure:  Compile-time      |  (amd64)
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by niteria):

 I don't have an optimized `HEAD` at hand, so I tried it with `ghc-8.0`
 branch:
 {{{
 $ for i in 1 10 100 1000 2000 4000 10000 20000; do echo $i; ./A.gen.sh $i
 > A.hs && time ghc8.0 -dno-debug-output -fmax-pmcheck-iterations=200000000
 A.hs; done
 1
 [1 of 1] Compiling A                ( A.hs, A.o )

 real    0m0.289s
 user    0m0.178s
 sys     0m0.032s
 10
 [1 of 1] Compiling A                ( A.hs, A.o )

 real    0m0.228s
 user    0m0.135s
 sys     0m0.031s
 100
 [1 of 1] Compiling A                ( A.hs, A.o )

 real    0m0.299s
 user    0m0.225s
 sys     0m0.038s
 1000
 [1 of 1] Compiling A                ( A.hs, A.o )

 real    0m2.087s
 user    0m1.941s
 sys     0m0.112s
 2000
 [1 of 1] Compiling A                ( A.hs, A.o )

 real    0m5.885s
 user    0m5.126s
 sys     0m0.127s
 4000
 [1 of 1] Compiling A                ( A.hs, A.o )

 real    0m15.612s
 user    0m15.094s
 sys     0m0.472s
 10000
 [1 of 1] Compiling A                ( A.hs, A.o )

 real    1m31.634s
 user    1m29.615s
 sys     0m1.873s
 20000
 [1 of 1] Compiling A                ( A.hs, A.o )

 A.hs:40006:3: warning:
     Pattern match checker exceeded (200000000) iterations in
     an equation for ‘fromEnum’. (Use -fmax-pmcheck-iterations=n
     to set the maximun number of iterations to n)
 }}}

 I will measure again after I build `HEAD`.

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


More information about the ghc-tickets mailing list