http://www.perlmonks.org?node_id=1210406


in reply to Re^4: Out of Memory when generating large matrix
in thread Out of Memory when generating large matrix

It was supposed to mean that a count is obtained for each of the (unique) element in a set. (Not the number of unique elements.) It doesn't really matter though, what is important is that a set on unique elements has to be constructed.

Constructing a set of unique elements is the same (algorithmically) as sorting, with the proviso that an ordered comparison function is available (i.e. set can be ordered). If only compare for equality is available, the construction becomes O(n*n).

  • Comment on Re^5: Out of Memory when generating large matrix

Replies are listed 'Best First'.
Re^6: Out of Memory when generating large matrix
by LanX (Saint) on Mar 06, 2018 at 14:46 UTC