RE: comparison of execution speed of array types
Hello,
DiffArray seems to be broken :). Either that or I'm using it incorrectly. I've attached the relevant code, but when I don't reverse the array everything works fine; when I reverse it the program doesn't (seem to) halt.
I've tried to use DiffArray recently and it is terribly slow. I was forced to write my own version (it is a bit faster, but still nothing great). My suspicion about the result of your measuring is that it does the updates in reversing the array one by one, thus leading to quadratic behavior. Zdenek Dvorak _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com
"Zdenek Dvorak"
DiffArray seems to be broken :). Either that or I'm using it incorrectly.
I've tried to use DiffArray recently and it is terribly slow.
Just another data point. I'm fumbling around with Arrays these days (see my recent post on haskell-cafe) and thought I'd try DiffArray. After all, I'm building large lists of index/values, and applying (//) to them. Now, the docs on how to use DAs aren't all that extensive, but I replaced the type signatures, and at least the type checker is happy. However, quickCheck (great tool) just prints a digit and hangs there. Running the compiled program gave: sefirot% !nice nice time ./a.out +RTS -p -h -K16M Fail: thread blocked indefinitely Command exited with non-zero status 1 1.08user 0.03system 0:01.13elapsed 97%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (272major+1756minor)pagefaults 0swaps I'm probably missing something essential, any idea what it might be? -kzm -- If I haven't seen further, it is by standing in the footprints of giants
participants (2)
-
ketil@ii.uib.no -
Zdenek Dvorak