r/Python • • Jan 17 '20

I made metaballs. Works quite fast. https://github.com/Norne9/metaballs

1.1k Upvotes

64 comments sorted by

View all comments

9

u/MattR0se Jan 17 '20

Can you explain how you utilize CORES = os.cpu_count() in the draw_balls function? Does numba.prange automatically invoke multiprocessing?

9

u/Norn9 Jan 17 '20

Yes. If you set parallel=True then numba.prange automatically execute you loop in parallel. If parallel=False then it works exactly like range