2 ms·
How is this not equally applicable to "constructing an object"?
by dnautics 5y ago
How is this not equally applicable to "constructing an object"?
- bsaul 5y agoit's pretty rare to have the size of an objet in memory be proportional to the number of times one of its method is called. It's usually proportional to the amount of "data" it stores. In the case of recursion, the "time" of computation may have a direct consequence, in itself, on the occupied memory (in the case of non-tail optimized calls)