Here in this article we will see a few ways to iterate a map and their performances.
The code is self explanatory.
The result of the durations are:
We can see the
Lambda takes the longest while Iterator is the fastest.
Apart from this there is the traditional age-old enhanced for loop.
|
No comments:
Post a Comment