Opened 3 years ago

Closed 3 years ago

#11989 closed bug (duplicate)

Performance bug reading large-exponent float without explicit type

Reported by: bpearlmutter Owned by:
Priority: normal Milestone:
Component: Runtime System Version: 7.10.3
Keywords: Cc: simonmar
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Runtime performance bug Test Case: 1e1000000 :: (RealFloat a => a)
Blocked By: Blocking:
Related Tickets: #9059, #5688, #5692, #7044 Differential Rev(s):
Wiki Page:

Description

$ time echo '1e700000' | ghci
GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
Prelude> Infinity
Prelude> Leaving GHCi.

real	1m25.799s
user	0m20.828s
sys	0m9.624s

$ time echo '1e700000::Double' | ghci
GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
Prelude> Infinity
Prelude> Leaving GHCi.

real	0m0.196s
user	0m0.120s
sys	0m0.032s

$ time echo 1e-800000 | ghci
GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
Prelude> Killed

real	2m8.879s
user	0m6.684s
sys	0m10.256s

Giving an explicit type (RealFloat a => a) doesn't make any difference.

Change History (2)

comment:1 Changed 3 years ago by j.waldmann

This happens with 8-rc4 as well.

comment:2 Changed 3 years ago by thomie

Resolution: duplicate
Status: newclosed

This is a real problem, but reported before as #9059 and others. Not much has been done in recent times to try to solve it.

I'm closing this ticket, to not let discussion spread over multiple tickets. Please reopen if you disagree.

Note: See TracTickets for help on using tickets.