
Since you're on the line, could you confirm or deny that the (//) operator is something equivalent to (roughly):
a // ps = runST (thaw a >>= \u -> update ps >> unsafeFreeze u)
I.e. that the list of updates are treated as an atomic operation? Because doing it that way explicitly sure didn't seem to help.
Yes, it is.
OTOH, doing lots of small (//) seems to be faster than doing a few large ones (containing the same updates). Go figure.
That's bizarre. Perhaps the results are obscured by some other optimisations which are happening. Cheers, Simon

"Simon Marlow"
OTOH, doing lots of small (//) seems to be faster than doing a few large ones (containing the same updates). Go figure.
That's bizarre. Perhaps the results are obscured by some other optimisations which are happening.
It is probably an operator error. I.e., me making a mistake; I had to rewrite the program a bit in order to make the change. Still, profiling shows that it's the array updates that take almost all the time. I'll try to sort out the benchmarks a bit next week, and if I still observe that behaviour, I'll try to distill a clean example for you. -kzm -- If I haven't seen further, it is by standing in the footprints of giants
participants (2)
-
ketil@ii.uib.no
-
Simon Marlow