This is a quite generic question but I haven't found clear and specific answers for C++.
I have a class with numerous methods, which may have a large number of instances implemented simultaneaously with calls to a few methods (<5) which are time-critical i.e. for real-time simulation, others methods being not time-critical. Would it be more time-efficient to declare the non-critical methods as static members, or even as non-class functions (as far as relevant/possible).
Now what about memory cost of dynamic methods vs. static methods or non-class methods? Is there a risk of memory shortage with a very large number of instances in either option?
If I missed a reference answering precisely this question, please forgive me or just give me a hint how to proceed, thanks in advance!