On Thu, 2007-11-08 at 22:54 -0800, Don Stewart wrote:
bulat.ziganshin:
definitely, it's a whole new era in low-level ghc programming
victory!
Now I want a way of getting (well-used) SIMD instructions and such, and
with some luck some high-level approach as well.
Hello Dan,
Thursday, November 8, 2007, 9:33:12 PM, you wrote:
main = do
a - newArray (0,n-1) 1.0 :: IO (IOUArray Int Double)
forM_ [0..n-2] $ \i - do { x - readArray a i; y - readArray a
(i+1); writeArray a (i+1) (x+y) }
x - readArray a (n-1)
print x
1. ghc doesn't implement
Dan Piponi [EMAIL PROTECTED] writes:
Even though 'n' is 10 times bigger in the C program it runs much
faster than the Haskell program on my MacBook Pro with Haskell 6.6.1.
I've tried lots of different combinations of flags that I've found in
various postings to haskell-cafe but to no avail.
On Fri, 2007-11-09 at 00:51 +0600, Mikhail Gusarov wrote:
Dan Piponi [EMAIL PROTECTED] writes:
Even though 'n' is 10 times bigger in the C program it runs much
faster than the Haskell program on my MacBook Pro with Haskell 6.6.1.
I've tried lots of different combinations of flags that
On Nov 8, 2007 2:48 PM, Duncan Coutts [EMAIL PROTECTED] wrote:
You really do not need happy to build ghc. Just ignore the extralibs
tarball.
Well that was the crucial fact I needed. 6.8.1 is now built. ghci
doesn't work, it complains about an unknown symbol '_environ' in
HSbase-3.0.0.0.o but I
On Fri, Nov 09, 2007 at 01:39:55AM +0100, Thomas Schilling wrote:
On Thu, 2007-11-08 at 16:24 -0800, Stefan O'Rear wrote:
On Thu, Nov 08, 2007 at 07:57:23PM +0100, Thomas Schilling wrote:
$ ghc --make -O2 ghc-bench.hs
Even for GCC (/not/ G_H_C)?
No, GCC implements -Ox properly.
I
On Thu, Nov 08, 2007 at 05:03:54PM -0800, Stefan O'Rear wrote:
On Fri, Nov 09, 2007 at 01:39:55AM +0100, Thomas Schilling wrote:
On Thu, 2007-11-08 at 16:24 -0800, Stefan O'Rear wrote:
On Thu, Nov 08, 2007 at 07:57:23PM +0100, Thomas Schilling wrote:
$ ghc --make -O2 ghc-bench.hs
On Thu, 2007-11-08 at 13:00 -0800, Dan Piponi wrote:
It looks like my whole question might become moot with ghc 6.8.1, but
so far I've been unable to build it due to the cyclic happy
dependency.
You really do not need happy to build ghc. Just ignore the extralibs
tarball. You can install any
nominolo:
On Thu, 2007-11-08 at 10:33 -0800, Dan Piponi wrote:
I see lots of shootout examples where Haskell programs seem to perform
comparably with C programs, but I find it hard to reproduce anything
like those figures when testing with my own code. So here's a simple
case:
I have
On Nov 8, 2007 11:34 AM, Jason Dusek [EMAIL PROTECTED] wrote:
Can you show us your compilation options and timings?
I was simply using -O3. I tried a bunch of other flags (copied from
the shootout examples) but they made no appreciable difference.
I was getting about 1.5s for the Haskell
Bulat Ziganshin [EMAIL PROTECTED] writes:
Hello Dan,
Thursday, November 8, 2007, 9:33:12 PM, you wrote:
main = do
a - newArray (0,n-1) 1.0 :: IO (IOUArray Int Double)
forM_ [0..n-2] $ \i - do { x - readArray a i; y - readArray a
(i+1); writeArray a (i+1) (x+y) }
x - readArray a
On Thu, Nov 08, 2007 at 07:57:23PM +0100, Thomas Schilling wrote:
$ ghc --make -O2 ghc-bench.hs
and got:
$ time ./ghc-bench
2.0e7
real0m0.714s
user0m0.576s
sys 0m0.132s
$ time ./ghcbC
2000.00
real0m0.305s
user0m0.164s
sys 0m0.132s
This
Don Stewart [EMAIL PROTECTED] writes:
xj2106:
I used `unsafePerformIO' with `INLINE', because I don't know
where `inlinePerformIO' is now. And also the `-optc-march'
is changed to `nocona'.
Using unsafePerformIO here would break some crucial inlining.
(the same trick is used in
dpiponi:
On Nov 8, 2007 11:34 AM, Jason Dusek [EMAIL PROTECTED] wrote:
Can you show us your compilation options and timings?
I was simply using -O3. I tried a bunch of other flags (copied from
the shootout examples) but they made no appreciable difference.
Argh, -O2 please. -O3 does
Dan Piponi [EMAIL PROTECTED] writes:
My wasn't intended to represent the problem that I'm trying to solve,
but the approach I want to take. The problems that I do want to solve
don't lend themselves to this kind of approach.
My real situation is that I want to write code that has both a
On Thu, 2007-11-08 at 10:33 -0800, Dan Piponi wrote:
I see lots of shootout examples where Haskell programs seem to perform
comparably with C programs, but I find it hard to reproduce anything
like those figures when testing with my own code. So here's a simple
case:
I have this C program:
On Thu, 2007-11-08 at 10:33 -0800, Dan Piponi wrote:
I see lots of shootout examples where Haskell programs seem to perform
comparably with C programs, but I find it hard to reproduce anything
like those figures when testing with my own code. So here's a simple
case:
I have this C program:
Bulat,
The strictness gave me something like a 10% performance increase
making the Haskell code more than 10 times slower than the C. Is this
the right type of array to use for performance?
--
Dan
On Nov 8, 2007 10:36 AM, Bulat Ziganshin [EMAIL PROTECTED] wrote:
Hello Dan,
Thursday, November
Mikhail,
main = do
print $ foldl' (+) 0 $ take 1 [1.0,1.0..]
works 10 times faster than your C version. You just need to adapt to the
radically different style of programming.
My wasn't intended to represent the problem that I'm trying to solve,
but the approach I want to take.
On Nov 8, 2007 11:24 AM, Thomas Schilling [EMAIL PROTECTED] wrote:
Wow. You should *really* try using GHC 6.8.1:
I was hoping you weren't going to say that :-) As soon as I find a
suitable 64-bit Intel binary for MacOSX, or can bootstrap my way out
of happy needing happy in my attempted source
Can you show us your compilation options and timings?
--
_jsn
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
dpiponi:
I see lots of shootout examples where Haskell programs seem to perform
comparably with C programs, but I find it hard to reproduce anything
like those figures when testing with my own code. So here's a simple
case:
I have this C program:
#include stdio.h
#define n 1
On Nov 8, 2007 11:36 AM, Paul Brown [EMAIL PROTECTED] wrote:
All that said, I'm not sure where I got the GHC that I used to build
the 6.6.1 via MacPorts; I think it shipped with MacOS once upon a time.
sudo port install ghc
. . .
configure: error: GHC is required unless bootstrapping from .hc
On Nov 8, 2007 12:16 PM, Don Stewart [EMAIL PROTECTED] wrote:
If you can post the code somewhere, that would be great, with examples
of how to reproduce your timings.
The code is exactly what I posted originally (but nore that n is 10
times larger in the C code). I compiled using ghc -O3 -o
dpiponi:
On Nov 8, 2007 12:16 PM, Don Stewart [EMAIL PROTECTED] wrote:
If you can post the code somewhere, that would be great, with examples
of how to reproduce your timings.
The code is exactly what I posted originally (but nore that n is 10
times larger in the C code). I compiled
On Nov 8, 2007 12:36 PM, Don Stewart [EMAIL PROTECTED] wrote:
dpiponi:
Can you start by retrying with flags from the spectral-norm benchmark:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=spectralnormlang=ghcid=0
Actually, that was my starting point for investigating how to
Don Stewart [EMAIL PROTECTED] writes:
Can you start by retrying with flags from the spectral-norm benchmark:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=spectralnormlang=ghcid=0
The interaction with gcc here is quite important, so forcing -fvia-C
will matter.
Clearly
bulat.ziganshin:
Hello Don,
Thursday, November 8, 2007, 10:53:28 PM, you wrote:
a - newArray (0,n-1) 1.0 :: IO (IOUArray Int Double)
forM_ [0..n-2] $ \i - do { x - readArray a i; y - readArray a
(i+1); writeArray a (i+1) (x+y) }
oh, i was stupid. obviously, first thing you
On Thu, 2007-11-08 at 16:24 -0800, Stefan O'Rear wrote:
On Thu, Nov 08, 2007 at 07:57:23PM +0100, Thomas Schilling wrote:
$ ghc --make -O2 ghc-bench.hs
and got:
$ time ./ghc-bench
2.0e7
real0m0.714s
user0m0.576s
sys 0m0.132s
$ time ./ghcbC
xj2106:
Don Stewart [EMAIL PROTECTED] writes:
Can you start by retrying with flags from the spectral-norm benchmark:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=spectralnormlang=ghcid=0
The interaction with gcc here is quite important, so forcing -fvia-C
will
bulat.ziganshin:
definitely, it's a whole new era in low-level ghc programming
victory!
-- Don :D
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
31 matches
Mail list logo