Re: Immutable Datastructures with good Sharing



On 11/5/2011 4:33 PM, Jan Burse wrote:
Arne Vajhøj schrieb:
But will the time you spend investigating this really cost less
than what it cost to buy 4 GB more RAM and just clone the objects
you want to store as history.

I do this already. But I have an application case where the
cloning not only incures more memory use but also more runtime.

How do you know that the clone solution use more CPU than
the solution you are looking for now??

When you clone you need to go through the whole array and copy
each element, this takes time. When you share, you don't need
to spend this time.

But you will need to do other things instead.

Currently the runtime is too high. So if you show me a shop
where I can buy CPU time as I can buy RAM, then this could be a
solution.

I believe there are many shops that will sell you
faster CPU's for the existing computers or
more CPU's for other computers.

Arne
.