n = 100
10
100
1,000
3,000
slow
0
fast
0
Both functions run on the list 0, 1, 2 ... n-1, which has no duplicates. Bars share one scale, so a tiny bar means a tiny count.