Re: [Haskell-cafe] Re: Progress on shootout entries

2006-01-05 Thread Chris Kuklewicz
I piped the output of fasta (with N=250,000) into the entries on the wiki [2] which I compiled with 'ghc -O2'. Watching with 'top', I saw over 400MB of RSIZE by the end. So perhaps I am benchmarking wrong, since this is the same memory usage as the original reverse-compliment entry, and roughly t

[Haskell-cafe] Re: Progress on shootout entries

2006-01-04 Thread Donald Bruce Stewart
I've added an entry on the hawiki[1] for the regex-dna benchmark, and posted a smaller (down to 15 lines), faster entry for [2]reverse-complement, using string indexing from Alex. Cheers, Don [1] http://haskell.org/hawiki/ShootoutEntry [2] http://haskell.org/hawiki/ReverseComplementEntry

Re: [Haskell-cafe] Re: Progress on shootout entries

2006-01-04 Thread Sebastian Sylvan
On 1/4/06, Chris Kuklewicz <[EMAIL PROTECTED]> wrote: > Sebastian Sylvan wrote: > > On 1/4/06, Josh Goldfoot <[EMAIL PROTECTED]> wrote: > > > >>Keep in mind that the shootout requires that the first 30 permutations > >>printed out by the Fannkuch benchmark to be exactly those given in the > >>"ex

Re: [Haskell-cafe] Re: Progress on shootout entries

2006-01-04 Thread Sebastian Sylvan
On 1/4/06, Chris Kuklewicz <[EMAIL PROTECTED]> wrote: > Sebastian Sylvan wrote: > > On 1/4/06, Josh Goldfoot <[EMAIL PROTECTED]> wrote: > > > >>Keep in mind that the shootout requires that the first 30 permutations > >>printed out by the Fannkuch benchmark to be exactly those given in the > >>"ex

Re: [Haskell-cafe] Re: Progress on shootout entries

2006-01-04 Thread Bulat Ziganshin
Hello Josh, Wednesday, January 04, 2006, 6:00:16 AM, you wrote: JG> I was able to significantly speed up the code by replacing the flip function with a function that relies entirely on pattern matching (no splitAts or reverses). It looks ugly, though: JG> mangle list@(1:xs) = list JG> mangle

Re: [Haskell-cafe] Re: Progress on shootout entries

2006-01-04 Thread Chris Kuklewicz
Sebastian Sylvan wrote: > On 1/4/06, Josh Goldfoot <[EMAIL PROTECTED]> wrote: > >>Keep in mind that the shootout requires that the first 30 permutations >>printed out by the Fannkuch benchmark to be exactly those given in the >>"example." > > > Well I'm one step closer to just not caring about

Re: [Haskell-cafe] Re: Progress on shootout entries

2006-01-04 Thread Sebastian Sylvan
On 1/4/06, Josh Goldfoot <[EMAIL PROTECTED]> wrote: > Keep in mind that the shootout requires that the first 30 permutations > printed out by the Fannkuch benchmark to be exactly those given in the > "example." Well I'm one step closer to just not caring about the shootout anymore. The spec say

Re: [Haskell-cafe] Re: Progress on shootout entries

2006-01-03 Thread Jan-Willem Maessen
I was surprised to learn that indexed insertion: permutations (x:xs) = [insertAt n x perms | perms <- permutations xs, n <- [0..length xs] ] insertAt :: Int -> a -> [a] -> [a] insertAt 0 y xs = y:xs insertAt n y (x:xs) = x:(insertAt (n-1) y xs) was faster than the

[Haskell-cafe] Re: Progress on shootout entries

2006-01-03 Thread Josh Goldfoot
Keep in mind that the shootout requires that the first 30 permutations printed out by the Fannkuch benchmark to be exactly those given in the "example." Any other order of permutations gets your code labeled "Error" by the shootout administrators. See the discussion here: http://alioth.debian

[Haskell-cafe] Re: Progress on shootout entries

2006-01-03 Thread Kimberley Burchett
I took a quick crack at optimizing fannkuch.hs. I got it down from 33s to 1.25s on my machine, with N=9. That should put it between forth and ocaml(bytecode) in the shootout page. The main changes I made were using Int instead of Int8, foldl' to accumulate the max number of folds, a custom f