[Haskell-cafe] ACM Task for C++ and Java programmers in Haskell.
How to make code faster?
bulat.ziganshin at gmail.com
Sun Mar 22 13:48:52 EDT 2009
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
> 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
> I tried to solve this task on Haskell but stuck with efficiency
> problems (approx in 1000 times slower and takes 20 times more memory).
> I hope
> the approach, I've used is correct and problem with data structures
> and implementation. It took more than 81% of time for garbage
> collection. I tried to use ByteStrings instead of Strings, but
> unfortunately it didn't help.
> The entire code I placed on
> The original instructions are on:
> Dictionary file could be downloaded from:
> Input data: http://www.flownet.com/ron/papers/lisp-java/input.txt
> Expected output:
> 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, prepare the
> program to support SMP parallelism.
> Very thanks in advance. Hope you'll enjoy this task :)
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe