This ends up causing log10(N) copies. When you get your 10th item, all of the 1s get packed into a pack of size 10. When you hit 100, all of them get put into another pack.
This ends up causing log10(N) copies. When you get your 10th item, all of the 1s get packed into a pack of size 10. When you hit 100, all of them get put into another pack.