3 ms·
It might also be that they’ve worked their way down the priority list and are getting to these features that are largely just to tidy up code.
by Waterluvian 3y ago
It might also be that they’ve worked their way down the priority list and are getting to these features that are largely just to tidy up code.
- stefan_ 3y agoClearing a container is usually a much simpler and faster operation than looping through all and removing them individually. That's not a question of tidying something up.
- onionisafruit 3y agoThere were compiler optimizations for clearing by iterating. I haven’t looked at the code, but I suspect this won’t be much more efficient than iterating was with the optimizations.
- yencabulator 3y agoI expect both will result in the same code; the only difference is that the clear built-in can handle maps with NaN keys.