Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#2462 closed bug (invalid)

Data.List.sum is slower than 6.8.3

Reported by: simonmar Owned by: simonpj
Priority: high Milestone: 6.10.1
Component: Compiler Version: 6.8.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime performance bug Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

main = print (sum [1..100000000::Int])

with 6.8.3:

  MUT   time    1.76s  (  1.79s elapsed)

with HEAD (22/7/08)

  MUT   time    1.97s  (  1.99s elapsed)

complete guess: sum has been mis-optimised by SAT?

Change History (8)

comment:1 Changed 6 years ago by simonpj

  • Owner set to simonpj

comment:2 Changed 6 years ago by simonpj

  • Resolution set to invalid
  • Status changed from new to closed

I can't reproduce this. I compiled

module Main( main ) where
main = print (sum [1..100000000::Int])

with -O and -O2 with the HEAD and 6.8.3. Results are essentially identical.

I'll close this, but if anyone else can reproduce it, please re-open.

		   Allocs	Runtime(user)
ghc-HEAD    -O	   8.031M	1.82s
ghc-HEAD    -O2	   8.031M	1.82s		
ghc-6.8.3   -O	   8.031M	1.82s
ghc-6.8.3   -O2    8.031M	1.82

Simon

comment:3 Changed 6 years ago by simonmar

  • Resolution invalid deleted
  • Status changed from closed to reopened

We think it's necessary to compile the definition of sum itself with -O2 in order to reproduce this.

comment:4 Changed 6 years ago by simonpj

  • Resolution set to invalid
  • Status changed from reopened to closed

I did that and it's still fine. Re-open if you think otherwise!

Simon

comment:5 Changed 6 years ago by simonmar

unreproducible for me too now.

comment:6 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:7 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:8 Changed 4 years ago by simonmar

  • Type of failure set to Runtime performance bug
Note: See TracTickets for help on using tickets.