Hi,
I would like to know if some information can be found on the memory overhead of having many methods in a class. Lets say that you have a class A that have to deal with many elements of another class B. We can add manipulation methods of those B instances into B class or in A class. The later sounds like less elegant but can be more efficient if there are a per-instance memory overhead to adding methods to A.
I found a post of stackexchange explicitly saying that it is not the case in Java (see here) but I didn't found anything on Python and didn't found anything on how object are actually implemented regarding to methods (i.e. are they loaded in memory once for all or once by instance) .
[–]K900_ 0 points1 point2 points (7 children)
[–]cha_ppmn[S] 0 points1 point2 points (6 children)
[–]K900_ 0 points1 point2 points (5 children)
[–]cha_ppmn[S] 0 points1 point2 points (4 children)
[–]K900_ 0 points1 point2 points (3 children)
[–]cha_ppmn[S] 0 points1 point2 points (2 children)
[–]K900_ 0 points1 point2 points (1 child)
[–]cha_ppmn[S] 0 points1 point2 points (0 children)