Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tpl/collections: Use MapRange/SetIterKey/SetIterValue for Where, Sort…
… and Merge Some relevant benchmarks: Where with maps: ``` cpu: Apple M1 Pro │ master.bench │ fix-mapkeys.bench │ │ sec/op │ sec/op vs base │ WhereMap-10 79.26µ ± 1% 26.58µ ± 1% -66.46% (p=0.002 n=6) │ master.bench │ fix-mapkeys.bench │ │ B/op │ B/op vs base │ WhereMap-10 56685.0 ± 0% 111.0 ± 1% -99.80% (p=0.002 n=6) │ master.bench │ fix-mapkeys.bench │ │ allocs/op │ allocs/op vs base │ WhereMap-10 2003.000 ± 0% 4.000 ± 0% -99.80% (p=0.002 n=6) ``` Merge: ``` │ master.bench │ fix-mapkeys.bench │ │ sec/op │ sec/op vs base │ Merge-10 3.285µ ± 0% 2.268µ ± 1% -30.96% (p=0.002 n=6) │ master.bench │ fix-mapkeys.bench │ │ B/op │ B/op vs base │ Merge-10 3.079Ki ± 0% 1.891Ki ± 0% -38.58% (p=0.002 n=6) │ master.bench │ fix-mapkeys.bench │ │ allocs/op │ allocs/op vs base │ Merge-10 64.00 ± 0% 26.00 ± 0% -59.38% (p=0.002 n=6) ``` Sort: ``` cpu: Apple M1 Pro │ master.bench │ fix-mapkeys.bench │ │ sec/op │ sec/op vs base │ SortMap-10 1008.0n ± 1% 915.5n ± 0% -9.18% (p=0.002 n=6) │ master.bench │ fix-mapkeys.bench │ │ B/op │ B/op vs base │ SortMap-10 640.0 ± 0% 512.0 ± 0% -20.00% (p=0.002 n=6) │ master.bench │ fix-mapkeys.bench │ │ allocs/op │ allocs/op vs base │ SortMap-10 16.00 ± 0% 15.00 ± 0% -6.25% (p=0.002 n=6) ```
- Loading branch information