3 ms·
> Deleting an element from a slice is a O(n) operation. It better be explicit in the program so the programmer knows just how expensive it is. The chances of d
by damagednoob 6y ago
> Deleting an element from a slice is a O(n) operation. It better be explicit in the program so the programmer knows just how expensive it is.
The chances of deleting an element in an array being a bottle-neck are really low. I'd rather save my brain cycles for thinking about disk/network access and wait for profiling to show me the problem.
- s3cur3 6y agoAgreed. And the fact that disk access might end up being a bottleneck is not a good argument for making disk access APIs less ergonomic. I say give the programmer the nicest set of tools possible and let them make informed decisions about what’s appropriate to use when.