imageproc icon indicating copy to clipboard operation
imageproc copied to clipboard

Optimize threshold_mut function with parallel iteration

Open spartajet opened this issue 1 month ago • 2 comments

Replace serial iterators with par_iter_mut() for improved performance. Leverage Rayon for parallel processing of image pixels. Maintains same functionality while potentially reducing processing time.

spartajet avatar Nov 03 '25 15:11 spartajet

Would it make more sense to create a secondary function for this that uses par_iter so if users want to run this single threaded they have that option? Also the time to setup the thread pool might take more time then to just run this in a single threaded instance.

OrangeHoopla avatar Nov 04 '25 17:11 OrangeHoopla

You are right, I will create new function like threshold_mut_parallel

spartajet avatar Nov 05 '25 01:11 spartajet