Federico Squartini wrote:
Thanks for the hints. It's a pity that (as far as I know) no one has
written a tutorial on those techniques, because I think it would be
appreciated. Some of them are quite involved and learning them just by
reading code is very time consuming.
There's the Performance
Frederico,
On Tue, 2007-05-01 at 13:59 +0200, Federico Squartini wrote:
I was reading an old post where Hal Daume III was analyzing Haskell
performance for arrays.
He proposed a test program which initializes an array, reverse it a
number of times, and sums the contents.
So I wrote a c++
On Tue, May 01, 2007 at 01:59:01PM +0200, Federico Squartini wrote:
I was reading an old post where Hal Daume III was analyzing Haskell
performance for arrays.
He proposed a test program which initializes an array, reverse it a number
of times, and sums the contents.
So I wrote a c++
Of course I know that the list version is very unfair, but I wanted to see
what was the trade off between elegance and speed.
Regarding whether low level programming makes sense or not, I was just
curious to see what are the limits of Haskell. Moreover there is not much
literature on high
federico.squartini:
Of course I know that the list version is very unfair, but I
wanted to see what was the trade off between elegance and
speed.
Regarding whether low level programming makes sense or not,
I was just curious to see what are the limits of Haskell.
Moreover
Sorry, I was very silly!
This is the correct version of the program using the doFromto loop.
And it runs fast! I hope there are no further mistakes.
Thanks Axel.
time ./IOMutUnbUnsafe
499
real0m0.708s
user0m0.573s
sys 0m0.008s
Thanks for the hints. It's a pity that (as far as I know) no one has
written a tutorial on those techniques, because I think it would be
appreciated. Some of them are quite involved and learning them just by
reading code is very time consuming.
Federico
I think another interesting data point would be for a C++ version
that uses the 'vector' data type from STL (Standard Template Library)
and using the vector indexing ops that do bounds-checking.
Regards,
Nikhil
___
Haskell mailing list
On 5/1/07, Federico Squartini [EMAIL PROTECTED] wrote:
Thanks for the hints. It's a pity that (as far as I know) no one has
written a tutorial on those techniques, because I think it would be
appreciated. Some of them are quite involved and learning them just by
reading code is very time
On 5/1/07, Federico Squartini [EMAIL PROTECTED] wrote:
Moreover there is not much literature on high performance Haskell programming
(tricks like unsafeWrite), at least organized in a systematic and concise way.
Look at: http://haskell.org/haskellwiki/Performance
regards,
Bas van Dijk
While scanning my Inbox I read 'fast' and 'array' in the context of
functional programming. Well, of course SaC instantly came to my mind (what
a surprise ;) ). So I did some measurements myself. I used your programs,
except that I increased the array size by a factor of 10. For the C++
version I
federico.squartini:
Sorry, I was very silly!
This is the correct version of the program using the doFromto loop.
And it runs fast! I hope there are no further mistakes.
Thanks Axel.
time ./IOMutUnbUnsafe
499
real 0m0.708s
user 0m0.573s
sys 0m0.008s
Here's an improved version,
12 matches
Mail list logo