These are chat archives for Fortran-FOSS-Programmers/General-Discussion

May 2017
Chris MacMackin
May 03 2017 17:04

@szaghi I've come up with an idea which should work better than the "forced finalisation" approach which I'm using currently. I'll still use my guard_/clean_temp methods, but I'll couple them with an object pool. That way, when a temporary object is ready to be "cleaned", I can simply release it back into the object pool for later reuse and no memory is leaked. A pool of 100 or so should be more than enough for most applications and would have a reasonably manageable minimal memory footprint.

This approach still would not be ammenable to pure procedures, so you likely won't want to take it. However, I thought it might be worth mentioning on here in case anyone else is interested. Note that I have not actually tested it yet, or done more than sketch out the basic details.

Stefano Zaghi
May 03 2017 19:04
@cmacmackin Chris, thank you very much, this is interesting. Please, keep me informed about it, in particular if you test it on your factual. Currently, I think I have found my nirvana coupling abstracts with pure math-operators (that has a restriction on abstraction, but a great performance boos), but your object pool approach could come in hand for totally abstract non pure operators. Thank you very much for your help!
Chris MacMackin
May 03 2017 20:06
@szaghi How much of a performance boost is there from using pure procedures? Do you know what sorts of optimisations are used? This is something I've wondered about.