erdogant / distfit

distfit is a python library for probability density fitting.
https://erdogant.github.io/distfit
Other
367 stars 26 forks source link

Feature request: parallel execution when fitting multiple distributions #34

Closed KrystofS closed 6 months ago

KrystofS commented 1 year ago

As of now distfit does not take advantage of multicore HW. While parallelism in Python is a bit tricky I think that parallel execution when fitting multiple distributions could be fairly easy and very beneficial improvement.

erdogant commented 1 year ago

That would be great indeed. If you have an idea or first approach, post it here and we can see whether it really speeds up. I already did some attempts at parallel programming (it is already in the code but with comments) but for some reason, it does not speed up. I must do something wrong.

KrystofS commented 1 year ago

I did not read through the codes but I'd assume it's related to this https://stackoverflow.com/questions/4496680/python-threads-all-executing-on-a-single-core. Anyways I did attempt to come up with a quick and simple solution #35 that should greatly improve perfomance on multicore machines.

erdogant commented 6 months ago

I released the new version with your contribution! Thank you! https://github.com/erdogant/distfit/releases/tag/1.8.0

Update to the latest version with pip install -U distfit If it breaks somehow, let me know asap.