Re: [Haskell-cafe] (flawed?) benchmark : sort

2008-03-04 Thread Chaddaï Fouché
2008/3/4, Krzysztof Skrzętnicki [EMAIL PROTECTED]: Hi I was playing with various versions of sorting algorithms. I know it's very easy to create flawed benchmark and I don't claim those are good ones. However, it really seems strange to me, that sort - library function - is actually the

Re: [Haskell-cafe] (flawed?) benchmark : sort

2008-03-04 Thread Neil Mitchell
Hi -- Zadanie 9 - merge sort mergeSort :: Ord a = [a] - [a] mergeSort []= [] mergeSort [x] = [x] mergeSort xs= let(l, r) = splitAt (length xs `quot` 2) xs in mergeSortP (mergeSort l) (mergeSort r) splitAt is not a particularly good way to split a list,

Re: [Haskell-cafe] (flawed?) benchmark : sort

2008-03-04 Thread Krzysztof Skrzętnicki
Thanks for improved code. My point was to measure which programming patterns are faster than the others so I can learn which ones I should use. However, the thing that is really bad is the fact, that even oneliner qsort_i is faster than library sort. Which is very different from what I've

Re: [Haskell-cafe] (flawed?) benchmark : sort

2008-03-04 Thread Chaddaï Fouché
2008/3/4, Krzysztof Skrzętnicki [EMAIL PROTECTED]: Thanks for improved code. My point was to measure which programming patterns are faster than the others so I can learn which ones I should use. However, the thing that is really bad is the fact, that even oneliner qsort_i is faster than

Re: [Haskell-cafe] (flawed?) benchmark : sort

2008-03-04 Thread Krzysztof Skrzętnicki
I get it now, thanks. Also, I guess it is possible to find a better algorithm for standard library sort. Christopher Skrzętnicki On Wed, Mar 5, 2008 at 12:04 AM, Chaddaï Fouché [EMAIL PROTECTED] wrote: 2008/3/4, Krzysztof Skrzętnicki [EMAIL PROTECTED]: Thanks for improved code. My point was

[Haskell-cafe] (flawed?) benchmark : sort

2008-03-03 Thread Krzysztof Skrzętnicki
Hi I was playing with various versions of sorting algorithms. I know it's very easy to create flawed benchmark and I don't claim those are good ones. However, it really seems strange to me, that sort - library function - is actually the worse measured function. I can hardly belive it, and I'd