Re: [Haskell-cafe] ACM Task for C++ and Java programmers in Haskell. How to make code faster?

2009-03-24 Thread Vasyl Pasternak
I changed the program, now it similar to the program from the wiki (http://www.haskell.org/haskellwiki/Phone_number) The version with ByteString compared to version with ordinary Strings works 3.5 times faster. (I put it to http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2830) But version with

[Haskell-cafe] ACM Task for C++ and Java programmers in Haskell. How to make code faster?

2009-03-22 Thread Vasyl Pasternak
Hi! Recently I've found interesting ACM research on C++ and Java efficiency. This task also was been solved on lisp/scheme and is described on http://www.flownet.com/ron/papers/lisp-java/ I tried to solve this task on Haskell but stuck with efficiency problems (approx in 1000 times slower and

Re: [Haskell-cafe] ACM Task for C++ and Java programmers in Haskell. How to make code faster?

2009-03-22 Thread Bulat Ziganshin
Hello Vasyl, Sunday, March 22, 2009, 8:25:02 PM, you wrote: i believe that i already seen this problem here a few years ago :) what search structure you was used? i think that immutable hash (represented as array of lists) would be useful here Hi! Recently I've found interesting ACM

Re: [Haskell-cafe] ACM Task for C++ and Java programmers in Haskell. How to make code faster?

2009-03-22 Thread Vasyl Pasternak
Thanks for the point. I've found haskell solution there http://www.haskell.org/haskellwiki/Phone_number The second (shorter) solution is fantastic, it beats all other languages, but I'll never wrote such code in reasonable time :) 2009/3/22 Bulat Ziganshin bulat.zigans...@gmail.com: Hello

Re: [Haskell-cafe] ACM Task for C++ and Java programmers in Haskell. How to make code faster?

2009-03-22 Thread wren ng thornton
Vasyl Pasternak wrote: The entire code I placed on http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2764 Could someone help me to make this code faster? I'd like to see solution that will be elegant and fast, without heavy optimizations, that will make code unreadable. Also, if it possible,