As I’m reworking a command (rep_uniq cols and rep_mode), I figured out how to parallelize my algorithm so that I can process everything on the parallel. From using separate dictionary per threads, and merging buckets of dictionaries per threads. Merging process is so fast that I process millions of colors in less than .5 s and the result matches colormap 0.
One thing I note is that fill/eval : mode is faster than doing a while loop on a small image up to number of threads to do the same thing. Like .6 s faster in 32.5 M colors image in my case in the scenario I’m on right now.
Which makes me ask, could it be possible to specify the number of threads to process a image, instead of automatically using min(whd(s),cpus) when using eval/fill? Like something like &2 which says use 2 threads
Like this:
fill[0] &4"begin(
# codehere
);
# codehere
"
That tells me the math parser will use 4 threads.