mattloper / chumpy

MIT License
196 stars 120 forks source link

The explicit call of gc.collect() #53

Open andreibogdanflorea opened 1 year ago

andreibogdanflorea commented 1 year ago

Could you please explain the reasoning behind explicitly calling the collect() method of the garbage collector in ch.py, line 802?

Have you encountered the issue of the memory blowing up during the optimization process?

I am asking this question because I am noticing a big difference in the time taken to optimize a function (especially when the memory is filled with additional objects managed by the collector), and I've tracked the bottleneck to the gc.collect() call.