#5505: Program runs faster with profiling than without
---------------------------------+------------------------------------------
Reporter: simonpj | Owner: simonmar
Type: bug | Status: new
Priority: high | Milestone: 7.4.1
Component: Compiler | Version: 7.0.3
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by simonmar):
Fascinating bug. I'm going to have to sleep on this and see if a fix
occurs to me.
For now, you can workaround it by adding `+RTS -Z`:
{{{
$ ./UULib +RTS -s -Z
./UULib +RTS -s -Z
138000
110,831,992 bytes allocated in the heap
51,956,344 bytes copied during GC
17,880,048 bytes maximum residency (6 sample(s))
3,212,328 bytes maximum slop
34 MB total memory in use (0 MB lost due to fragmentation)
Generation 0: 190 collections, 0 parallel, 0.23s, 0.24s elapsed
Generation 1: 6 collections, 0 parallel, 0.07s, 0.07s elapsed
INIT time 0.00s ( 0.00s elapsed)
MUT time 0.11s ( 0.11s elapsed)
GC time 0.30s ( 0.30s elapsed)
EXIT time 0.00s ( 0.00s elapsed)
Total time 0.41s ( 0.41s elapsed)
}}}
Or alternatively avoid using `unsafePerformIO` (I presume you're using
that somewhere in the `uulib` package?), or change it to
`unsafeDupablePerformIO`.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5505#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs