[GHC] #15646: ghci takes super long time to find the type of large fractional number
GHC
ghc-devs at haskell.org
Sat Nov 10 13:06:52 UTC 2018
#15646: ghci takes super long time to find the type of large fractional number
-------------------------------------+-------------------------------------
Reporter: Johannkokos | Owner:
| JulianLeviston
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: GHCi | Version: 8.4.3
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by JulianLeviston):
Thanks for the direction. Apologies for taking so long to get back; I've
had the flu.
`-v3` output is fascinating (thanks, I wasn't aware of it), because
nothing is marked as slow. I'll look into building a profiled compiler.
The pause happens immediately before `1e100000000 :: Fractional p => p` is
output. Here's the output for anyone following along's interest:
{{{
Expanse:ghc julian$ ./inplace/bin/ghc-stage2 -v3 -Rghc-timing -e ':t
1e100000000'
Glasgow Haskell Compiler, Version 8.7.20181012, stage 2 booted by GHC
version 8.4.3
Using binary package database:
/Users/julian/code/haskell/ghc/inplace/lib/package.conf.d/package.cache
package flags []
loading package database
/Users/julian/code/haskell/ghc/inplace/lib/package.conf.d
wired-in package ghc-prim mapped to ghc-prim-0.5.3
wired-in package integer-wired-in mapped to integer-gmp-1.0.2.0
wired-in package base mapped to base-4.12.0.0
wired-in package rts mapped to rts
wired-in package template-haskell mapped to template-haskell-2.14.0.0
wired-in package ghc mapped to ghc-8.7
*** Parser [source]:
!!! Parser [source]: finished in 0.83 milliseconds, allocated 0.489
megabytes
*** Desugar:
*** Simplify [expr]:
!!! Simplify [expr]: finished in 0.64 milliseconds, allocated 0.367
megabytes
*** CorePrep [expr]:
!!! CorePrep [expr]: finished in 5.45 milliseconds, allocated 5.770
megabytes
*** ByteCodeGen [Ghci1]:
!!! ByteCodeGen [Ghci1]: finished in 0.52 milliseconds, allocated 0.488
megabytes
Loading package ghc-prim-0.5.3 ... linking ... done.
Loading package integer-gmp-1.0.2.0 ... linking ... done.
*** gcc:
gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE
-B/Users/julian/code/haskell/ghc/libraries/base/dist-install/build
--print-file-name libiconv.dylib
*** gcc:
gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE
-B/Users/julian/code/haskell/ghc/libraries/base/dist-install/build
--print-file-name liblibiconv.dylib
*** gcc:
gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE
-B/Users/julian/code/haskell/ghc/libraries/base/dist-install/build
--print-file-name iconv.lib
*** gcc:
gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE
-B/Users/julian/code/haskell/ghc/libraries/base/dist-install/build
--print-file-name libiconv.lib
*** gcc:
gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE
-B/Users/julian/code/haskell/ghc/libraries/base/dist-install/build
--print-file-name libiconv.dll.a
*** gcc:
gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE
-B/Users/julian/code/haskell/ghc/libraries/base/dist-install/build
--print-file-name iconv.dll.a
*** gcc:
gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE
-B/Users/julian/code/haskell/ghc/libraries/base/dist-install/build
--print-file-name libiconv.a
*** gcc:
gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE
-B/Users/julian/code/haskell/ghc/libraries/base/dist-install/build
--print-file-name iconv.a
*** gcc:
gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE
-B/Users/julian/code/haskell/ghc/libraries/base/dist-install/build
--print-file-name libiconv
*** gcc:
gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE
-B/Users/julian/code/haskell/ghc/libraries/base/dist-install/build
--print-file-name iconv
Loading package base-4.12.0.0 ... linking ... done.
Search directories (user):
Search directories (gcc):
*** Parser [source]:
!!! Parser [source]: finished in 0.15 milliseconds, allocated 0.153
megabytes
*** Desugar:
*** Simplify [expr]:
!!! Simplify [expr]: finished in 0.32 milliseconds, allocated 0.203
megabytes
*** CorePrep [expr]:
!!! CorePrep [expr]: finished in 0.16 milliseconds, allocated 0.112
megabytes
*** ByteCodeGen [Ghci1]:
!!! ByteCodeGen [Ghci1]: finished in 0.31 milliseconds, allocated 0.299
megabytes
*** Parser [source]:
!!! Parser [source]: finished in 0.20 milliseconds, allocated 0.215
megabytes
*** Desugar:
*** Simplify [expr]:
!!! Simplify [expr]: finished in 0.35 milliseconds, allocated 0.224
megabytes
*** CorePrep [expr]:
!!! CorePrep [expr]: finished in 0.15 milliseconds, allocated 0.089
megabytes
*** ByteCodeGen [Ghci1]:
!!! ByteCodeGen [Ghci1]: finished in 0.36 milliseconds, allocated 0.351
megabytes
*** Parser [source]:
!!! Parser [source]: finished in 0.09 milliseconds, allocated 0.043
megabytes
1e100000000 :: Fractional p => p
Leaving GHCi.
*** Deleting temp files:
Deleting:
*** Deleting temp dirs:
Deleting:
<<ghc: 223511272 bytes, 80 GCs, 12572972/49798120 avg/max bytes residency
(9 samples), 154M in use, 0.000 INIT (0.003 elapsed), 4.102 MUT (4.434
elapsed), 0.172 GC (0.187 elapsed) :ghc>>
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15646#comment:48>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list