Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread Donald Bruce Stewart
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 ve

[Haskell] ANNOUNCE: Atom 2007.05

2007-05-01 Thread Tom Hawkins
Atom, a high-level hardware description language embedded in Haskell, compiles conditional term rewriting systems into conventional HDL. New in this release: - VHDL code generation (synthesis only, simulation directives not supported). - Improved rule mutual exclusion analysis. Now, mutual e

Re: [Haskell] refactoring, catamorphism, termination of programs

2007-05-01 Thread José Pedro Correia
Hi Maybe this link is of interest to you: http://wiki.di.uminho.pt/twiki/bin/view/Research/PURe/WebHome. A tool called DrHylo, developed in the context of this project is available, altough I don't know how suitable it could be for you: http://wiki.di.uminho.pt/twiki/bin/view/Personal/Alcino/DrHyl

[Haskell] ANNOUNCE: rsa-haskell 2.0.1

2007-05-01 Thread David Sankel
RSA-Haskell is a collection of command-line cryptography tools and a cryptography library written in Haskell. It is intended to be useful to anyone who wants to secure files or communications or who wants to incorporate cryptography in their Haskell application. Download and documentation are ava

[Haskell] Re: refactoring, catamorphism, termination of programs

2007-05-01 Thread Stefan Monnier
> I'm looking for a tool that implements the source code transformation > "replace recursion by catamorphism" (fold etc.). > My application is that if the transformation succeeds, > it implies that the program terminates. (roughly) > I don't want to make a big research project out of this, > rath

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread Stephan Herhut
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

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread Bas van Dijk
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 _

[Haskell] refactoring, catamorphism, termination of programs

2007-05-01 Thread Johannes Waldmann
Dear all, I'm looking for a tool that implements the source code transformation "replace recursion by catamorphism" (fold etc.). My application is that if the transformation succeeds, it implies that the program terminates. (roughly) I don't want to make a big research project out of this, rath

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread Taral
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 consum

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread Rishiyur Nikhil
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 Haskell@haskell.

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread Federico Squartini
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 __

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread 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 real0m0.708s user0m0.573s sys 0m0.008s --

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread Donald Bruce Stewart
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. >Mo

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread 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 there is not much literature on high performa

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread Stefan O'Rear
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++ r

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread Axel Simon
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

[Haskell] Haskell fast (?) arrays

2007-05-01 Thread Federico Squartini
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 litt