3 ms·
>The moral this time might be, try to not have functions that work on one object, and are O(N_objects) complexity. They absolutely might be fine when called on
by aaaaaaaaaaab 4y ago
>The moral this time might be, try to not have functions that work on one object, and are O(N_objects) complexity. They absolutely might be fine when called on one object. But sooner or later, someone will need to do that operation on N objects at once, and whoops suddenly you are in quadratic complexity land.
I usually put it this way to my colleagues: on a long enough timescale, every function will be called from a `for` loop.