3 ms·
looks linear to me? Takes n calls, each is O(1). > the fact that it’s allocation behaviour is horrible, leaving behind ‘count-1’ garbage objects Topic is TCO,
by nsonha 3y ago
looks linear to me? Takes n calls, each is O(1).
> the fact that it’s allocation behaviour is horrible, leaving behind ‘count-1’ garbage objects
Topic is TCO, which is kinda about that.
- eddd-ddde 3y agoThe array spreads mean that each step has to do linear work to create the next array