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
Hello Federico,
Tuesday, May 1, 2007, 7:23:45 PM, you wrote:
Thanks for the hints. It's a pity that (as far as I know) no one has
written a tutorial on those techniques,
except for me :) - http://haskell.org/haskellwiki/Modern_array_libraries
--
Best regards,
Bulat
Hello Donald,
Wednesday, May 2, 2007, 7:38:25 AM, you wrote:
Here's an improved version, using Foreign.Marshal.Array. I spent about 2
minutes inspecting the core, as well.
i think that using just the ! on array arguments should be enough.
there is nothing magic in usafeReadArray calls, they
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++ reference program, a naive haskell version using lists and
I also tweaked a
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,
15 matches
Mail list logo