On 29/03/2010, at 02:27, Lennart Augustsson wrote:
Does anything change if you swap the first two rhss?
No, not as far as I can tell.
On Sun, Mar 28, 2010 at 1:28 AM, Roman Leshchinskiy r...@cse.unsw.edu.au
wrote:
On 28/03/2010, at 09:47, Lennart Augustsson wrote:
It's important to
On Sat, Mar 27, 2010 at 8:16 PM, Roman Leshchinskiy r...@cse.unsw.edu.auwrote:
On 28/03/2010, at 01:36, Jan-Willem Maessen wrote:
It's worth pointing out that there's a bit of bang-pattern mysticism
going on in this conversation (which has not been uncommon of late!). A
non-buggy
Does anything change if you swap the first two rhss?
On Sun, Mar 28, 2010 at 1:28 AM, Roman Leshchinskiy r...@cse.unsw.edu.au
wrote:
On 28/03/2010, at 09:47, Lennart Augustsson wrote:
It's important to switch from mod to rem. This can be done by a
simple abstract interpretation.
Also,
On Sat, Mar 27, 2010 at 12:56 AM, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:
Using bang patterns didn't help almost anything here. Using rem
instead of mod made the time go from 45s to 40s. Now, using -fvia-C
really helped (when I used rem but not using mod). It went down to
10s.
David Menendez wrote:
On Sat, Mar 27, 2010 at 12:56 AM, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:
Using bang patterns didn't help almost anything here. Using rem
instead of mod made the time go from 45s to 40s. Now, using -fvia-C
really helped (when I used rem but not using mod). It
Hi,
Rafael Almeida wrote:
On Fri, Mar 26, 2010 at 6:49 PM, Jason Dagit da...@codersbase.com wrote:
Using bang patterns didn't help almost anything here. Using rem
instead of mod made the time go from 45s to 40s. Now, using -fvia-C
really helped (when I used rem but not using mod). It went
Hi John,
Any chance of seeing the benchmark? You're not the only one with an
optimising compiler tucked away somewhere :-)
I have one benchmark where I outperform GHC by 21 times, although
saying it's artificial is a bit of an understatement...
Thanks, Neil
On Fri, Mar 26, 2010 at 6:27 PM,
On Sat, Mar 27, 2010 at 12:43 AM, Rafael Almeida almeida...@gmail.comwrote:
On Fri, Mar 26, 2010 at 6:49 PM, Jason Dagit da...@codersbase.com wrote:
On Fri, Mar 26, 2010 at 2:33 PM, Bryan O'Sullivan b...@serpentine.com
wrote:
On Fri, Mar 26, 2010 at 10:46 AM, Rafael Cunha de Almeida
On 10-03-26 11:50 PM, wren ng thornton wrote:
Well GHC has an -O3[1], but it's not a good idea to use it. Some of
the optimizations that -O3 does can result in slower code for
particular programs. Whereas -O2 is safe and never results in
pessimizations.
Slightly off topic, but ACOVEA may
On Fri, 26 Mar 2010 21:56:16 -0700, Thomas DuBuisson wrote:
Using bang patterns didn't help almost anything here. Using rem
instead of mod made the time go from 45s to 40s. Now, using -fvia-C
really helped (when I used rem but not using mod). It went down to
10s.
Bang patterns should have
Jan-Willem Maessen wrote:
It's worth pointing out that there's a bit of bang-pattern mysticism
going on in this conversation (which has not been uncommon of late!). A
non-buggy strictness analyzer should expose the strictness of these
functions without difficulty.
Could the result of
On Sat, Mar 27, 2010 at 1:45 PM, Tillmann Rendel
ren...@mathematik.uni-marburg.de wrote:
Jan-Willem Maessen wrote:
It's worth pointing out that there's a bit of bang-pattern mysticism going
on in this conversation (which has not been uncommon of late!). A non-buggy
strictness analyzer should
On Sat, Mar 27, 2010 at 3:25 AM, Neil Mitchell ndmitch...@gmail.com wrote:
Hi John,
Any chance of seeing the benchmark? You're not the only one with an
optimising compiler tucked away somewhere :-)
Neil, for some reason John's reply didn't thread with the rest of the
thread. Probably
John Meacham wrote:
Here are jhc's timings for the same programs on my machine. gcc and ghc
both used -O3 and jhc had its full standard optimizations turned on.
jhc:
./hs.out 5.12s user 0.07s system 96% cpu 5.380 total
gcc:
./a.out 5.58s user 0.00s system 97% cpu 5.710 total
ghc:
It's important to switch from mod to rem. This can be done by a
simple abstract interpretation.
I'm nore sure if it's jhc or gcc that does this for jhc.
-- Lennart
On Sat, Mar 27, 2010 at 10:30 PM, Rafael Cunha de Almeida
almeida...@gmail.com wrote:
John Meacham wrote:
Here are jhc's
Lennart Augustsson wrote:
It's important to switch from mod to rem. This can be done by a
simple abstract interpretation.
I'm nore sure if it's jhc or gcc that does this for jhc.
It's not just adding rem. Ghc still runs much slower using rem. It's
only when switching to -fvia-C and using
On Sat, Mar 27, 2010 at 07:30:30PM -0300, Rafael Cunha de Almeida wrote:
John Meacham wrote:
Here are jhc's timings for the same programs on my machine. gcc and ghc
both used -O3 and jhc had its full standard optimizations turned on.
jhc:
./hs.out 5.12s user 0.07s system 96% cpu 5.380
On 28/03/2010, at 01:36, Jan-Willem Maessen wrote:
It's worth pointing out that there's a bit of bang-pattern mysticism going on
in this conversation (which has not been uncommon of late!). A non-buggy
strictness analyzer should expose the strictness of these functions without
difficulty.
On 27/03/2010, at 05:27, John Meacham wrote:
Here are jhc's timings for the same programs on my machine. gcc and ghc
both used -O3 and jhc had its full standard optimizations turned on.
jhc:
./hs.out 5.12s user 0.07s system 96% cpu 5.380 total
gcc:
./a.out 5.58s user 0.00s system 97%
On 28/03/2010, at 11:07, John Meacham wrote:
I have not thoroughly checked it, but I think there are a couple things
going on here:
It could also be worthwhile to float out (i*i + j*j) in rangeK instead of
computing it in every loop iteration. Neither ghc nor gcc can do this; if jhc
can then
On 28/03/2010, at 09:47, Lennart Augustsson wrote:
It's important to switch from mod to rem. This can be done by a
simple abstract interpretation.
Also, changing the definition of rem from
a `rem` b
| b == 0 = divZeroError
| a == minBound b == (-1) =
Hello,
During a talk with a friend I came up with two programs, one written in
C and another in haskell.
Haskell
main :: IO ()
main = print $ rangeI 0 0
rangeK :: Int - Int - Int - Int - Int
rangeK i j k acc
| k 1000 =
if i *
On Fri, Mar 26, 2010 at 10:46 AM, Rafael Cunha de Almeida
almeida...@gmail.com wrote:
Hello,
During a talk with a friend I came up with two programs, one written in
C and another in haskell.
Haskell
main :: IO ()
main = print $ rangeI 0 0
rangeK :: Int - Int - Int
Here are jhc's timings for the same programs on my machine. gcc and ghc
both used -O3 and jhc had its full standard optimizations turned on.
jhc:
./hs.out 5.12s user 0.07s system 96% cpu 5.380 total
gcc:
./a.out 5.58s user 0.00s system 97% cpu 5.710 total
ghc:
./try 31.11s user 0.00s system
On Fri, Mar 26, 2010 at 10:46 AM, Rafael Cunha de Almeida
almeida...@gmail.com wrote:
During a talk with a friend I came up with two programs, one written in
C and another in haskell.
Your Haskell code builds a huge thunked accumulator value, so of course it's
slow (put bang patterns on all
On Fri, Mar 26, 2010 at 2:33 PM, Bryan O'Sullivan b...@serpentine.comwrote:
On Fri, Mar 26, 2010 at 10:46 AM, Rafael Cunha de Almeida
almeida...@gmail.com wrote:
During a talk with a friend I came up with two programs, one written in
C and another in haskell.
Your Haskell code builds a
I'd guess that the LLVM backend could generate code that is at least
as fast as gcc. It would be nice if you could test it.
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 27 March 2010 04:46, Rafael Cunha de Almeida almeida...@gmail.com wrote:
During a talk with a friend I came up with two programs, one written in
C and another in haskell.
snip
The Haskell version:
real 0m45.335s
user 0m45.275s
sys 0m0.004s
against the C version:
real
On Fri, Mar 26, 2010 at 6:16 PM, Felipe Lessa felipe.le...@gmail.com wrote:
I'd guess that the LLVM backend could generate code that is at least
as fast as gcc. It would be nice if you could test it.
NCG done with GHC 6.12.1 w/ -O3
LLVM using a version of HEAD w/ -O3
GCC version 4.4.3 w/ -O3
On Fri, Mar 26, 2010 at 10:42 PM, Bernie Pope florbit...@gmail.com wrote:
On 27 March 2010 04:46, Rafael Cunha de Almeida almeida...@gmail.com wrote:
During a talk with a friend I came up with two programs, one written in
C and another in haskell.
snip
The Haskell version:
real
On Fri, Mar 26, 2010 at 6:49 PM, Jason Dagit da...@codersbase.com wrote:
On Fri, Mar 26, 2010 at 2:33 PM, Bryan O'Sullivan b...@serpentine.com
wrote:
On Fri, Mar 26, 2010 at 10:46 AM, Rafael Cunha de Almeida
almeida...@gmail.com wrote:
During a talk with a friend I came up with two
Using bang patterns didn't help almost anything here. Using rem
instead of mod made the time go from 45s to 40s. Now, using -fvia-C
really helped (when I used rem but not using mod). It went down to
10s.
Bang patterns should have helped tons - it isn't GHC thats at fault
here and yes it does
32 matches
Mail list logo