-O/-O2 causes program to run too slow

David Spies dnspies at gmail.com
Sun Dec 7 17:52:07 UTC 2014


I have a program I wrote to submit for the Car Game problem on Kattis:
https://open.kattis.com/problems/cargame
but it runs over the 5-second time-limit

I downloaded the test data and found that on GHC 7.8.3, if I switch from
-O2 to -O0, it runs three times faster (almost certainly fast enough for
Kattis to accept).  Can someone tell me what's going on?  Is this a bug?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141207/776fd571/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Main.hs
Type: text/x-haskell
Size: 1980 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141207/776fd571/attachment-0001.hs>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cargame-03.in
Type: application/octet-stream
Size: 535014 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141207/776fd571/attachment-0001.obj>


More information about the ghc-devs mailing list