#1261: optLevelFlags is not monotonic
----------------------------------------------+-----------------------------
Reporter: Stefan O'Rear <[EMAIL PROTECTED]> | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.8
Component: Compiler | Version: 6.7
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: x86
Os: Linux |
----------------------------------------------+-----------------------------
Changes (by igloo):
* milestone: => 6.8
Old description:
> GHC 6.7.20070213 and all later versions I have fail to unbox this:
>
> [EMAIL PROTECTED]:~/memset$ cat Memtest.hs
> import Foreign
>
> wset :: Int -> Int -> Ptr Int -> IO ()
> wset x y z | x `seq` y `seq` z `seq` False = undefined
> wset 0 vl pt = return ()
> wset ct vl pt = poke pt vl >> wset (ct - 1) vl (pt `advancePtr` 1)
>
> main = mallocArray (2^26) >>= wset (2^26) 42
>
> with a resultant 15x performance regression:
>
> [EMAIL PROTECTED]:~/memset$ ghc-6.7.20070213 -O3 Memtest.hs ; time ./a.out
>
> real 0m5.774s
> user 0m4.904s
> sys 0m0.768s
> [EMAIL PROTECTED]:~/memset$ ghc-6.6 -O3 Memtest.hs ; time ./a.out
>
> real 0m1.043s
> user 0m0.304s
> sys 0m0.724s
>
> (Toggling -fasm/-fvia-C makes no appreciable difference.)
New description:
GHC 6.7.20070213 and all later versions I have fail to unbox this:
{{{
[EMAIL PROTECTED]:~/memset$ cat Memtest.hs
import Foreign
wset :: Int -> Int -> Ptr Int -> IO ()
wset x y z | x `seq` y `seq` z `seq` False = undefined
wset 0 vl pt = return ()
wset ct vl pt = poke pt vl >> wset (ct - 1) vl (pt `advancePtr` 1)
main = mallocArray (2^26) >>= wset (2^26) 42
with a resultant 15x performance regression:
[EMAIL PROTECTED]:~/memset$ ghc-6.7.20070213 -O3 Memtest.hs ; time ./a.out
real 0m5.774s
user 0m4.904s
sys 0m0.768s
[EMAIL PROTECTED]:~/memset$ ghc-6.6 -O3 Memtest.hs ; time ./a.out
real 0m1.043s
user 0m0.304s
sys 0m0.724s
}}}
(Toggling -fasm/-fvia-C makes no appreciable difference.)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1261>
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