in reply to Perl Hashes in C?
Counting unique pixel values is the equivalent of sort | uniq. No hashing, no associative maps are necessary.
A good solution involves picking the most suitable sort algorithm and implementation. One might bucket by one color, then mergesort and count on the 32bit values. Anyway, 30 million items single-threaded — this ought to be ~1 sec job.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Hashes in C? (just sort)
by Your Mother (Archbishop) on Aug 15, 2015 at 13:35 UTC | |
by Anonymous Monk on Aug 15, 2015 at 15:03 UTC |