#1687: A faster (^)-function.
------------------------------------------+---------------------------------
Reporter: [EMAIL PROTECTED] | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.8
Component: Prelude | Version: 6.6.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Linux | Testcase:
Architecture: x86 |
------------------------------------------+---------------------------------
Comment (by moonlite):
Ok, so i've managed to test it using only Ints and the operation with both
ghc's and mine are so fast that my current test-method can't measure any
differences so i made a new test:
{{{
main = print (manyTest `mod` 2)
manyTest = sum $ map ((2::Int)^) ([1..100000000] :: [Int])
}}}
These are the results:
{{{
$ time ./mytest
real 1m23.989s
user 1m23.745s
sys 0m0.108s
$ time ./ghctest
0
real 0m36.946s
user 0m36.878s
sys 0m0.028s
}}}
So (like quicksilver on #haskell also thought) my function is only faster
on the Integer type. Perhaps it's interesting anyways
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1687>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs