Re:For Better Computing, Liberate CPUs from Garbage Collection
by reitzensteinm on Thursday May 09, 2019 @04:43AM
(#19866462)
Erlang style immutable reference counted shared memory is not at all state of the art. Persistent data structures are common and effective. I have implemented several myself, to store and update trees that don't fit in main memory. If you're updating one byte of your physicist's (say) 1 petabyte dataset, it requires ten memory allocations (log[branch factor] of the size of the dataset).
If you're updating the whole thing linearly, do consider that updating something in place or creating an updated copy is identical in terms of performance; a storage device doesn't care whether the bits streaming back are overwriting the same locations or new ones. Though of course you end up with both copies at the end.
Re:For Better Computing, Liberate CPUs from Garbage Collection
by mafribe on Friday May 10, 2019 @04:03AM
(#19875984)
Are there high-performance matrix multiplication libraries, e.g. for fluid-dynamics simulations, that are implemented using persistent data structures?
Re:For Better Computing, Liberate CPUs from Garbage Collection
by reitzensteinm on Saturday May 11, 2019 @04:35AM
(#19885231)
Are there any where multiple threads are mutating overlapping sections of memory? How exactly do you think a GPU matrix multiply violates my initial assertion?
Re:For Better Computing, Liberate CPUs from Garbage Collection
by McWobbleston on Thursday May 09, 2019 @04:11PM
(#19871915)
Usually when working with immutable data you don't need to copy it around, you can just pass it around via reference, and the data structure will support cheap "updates". You can see this in F# and Clojure where immutable maps are supported by tree structures, and operations like add/remove return a new reference without touching the original while being reasonably performant.
Erlang-style shared-nothing is brilliant if you can afford it, but it's affordable only for small data.