Hacker News new | ask | show | jobs
by tapirl 1312 days ago
Yes, for most cases, the for-loop is as efficient as the proposed "clear" function. I am not sure whether or not this is still true if there are NaN keys in the cleared map.