|
[ ghc-Bugs-753152 ] strange non-optimising: msg#00054lang.haskell.glasgow.bugs
Bugs item #753152, was opened at 2003-06-12 02:29 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=753152&group_id=8032 Category: Compiler Group: 5.04.2 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: strange non-optimising Initial Comment: Don't know if this is a bug, but it was at least _surprising_ to find that playerMostOccur [a] = a playerMostOccur (x:xs)| numOccur x (x:xs) > numOccur (playerMostOccur xs) xs = x | otherwise = playerMostOccur xs was exponentially slower when compiled with ghc-5.04.2 -O than: playerMostOccur [a] = a playerMostOccur (x:xs)| numOccur x (x:xs) > numOccur pmo xs = x | otherwise = pmo where pmo = playerMostOccur xs Although the student responsible for the code couldn't spot the obvious optimisation, I was expecting that GHC's optimiser would. :) If it's not a bug, could you explain it to me? -Greg(gregm.at.cs.uwa.edu.au) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=753152&group_id=8032
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | GHCi bug - the impossible happened loading FranTk with ghc-6.0 on Win32, Guest, Simon |
|---|---|
| Next by Date: | Problem when compiling with -prof -fasm, Zdenek Dvorak |
| Previous by Thread: | GHCi bug - the impossible happened loading FranTk with ghc-6.0 on Win32, Guest, Simon |
| Next by Thread: | Problem when compiling with -prof -fasm, Zdenek Dvorak |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |