[erlang-questions] Efficient sum matrix by column

Vance Shipley <>
Sun Apr 12 20:46:17 CEST 2015


On Sun, Apr 12, 2015 at 10:53 PM, Alexander Petrovsky
<> wrote:
> I have about 100 nodes in cluster, each node in cluster contains about
> 100000 elements in proplist. All proplists have equal length, the same keys,
> but different values. I need to get the sum values for every key between all
> proplists. By example, it can be represented as matrix NxM (N~=100,
> M~=100000), and I need to get the sum by column.

Firstly proplists is probably not the data structure you want to use,
as has been pointed out.

Secondly you may want to consider storing the column sums, updating
each time a column row is updated.
That could be quite cheap to do if the sums are always incremented for example.

-- 
     -Vance


More information about the erlang-questions mailing list