I\'m experimenting with filtering through elements in parallel. For each element, I need to perform a distance calculation to see if it is close enough to a target point. Ne
You need to call shutdown-agents
to kill the threads backing the threadpool used by pmap.
About pfilter
, it should work but run slower than filter
, since your predicate is simple. Parallelization isn't free so you have to give each thread moderately intensive tasks to offset the multithreading overhead. Batch your items before filtering them.