diff options
Diffstat (limited to 'tests/benchmarks/sortedmap-set/pds.go')
-rw-r--r-- | tests/benchmarks/sortedmap-set/pds.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/benchmarks/sortedmap-set/pds.go b/tests/benchmarks/sortedmap-set/pds.go new file mode 100644 index 0000000..a9837b1 --- /dev/null +++ b/tests/benchmarks/sortedmap-set/pds.go @@ -0,0 +1,23 @@ +package pds + +import ( + "flag" +) + + + +var nFlag = flag.Int( + "n", + 1_000, + "The number of iterations to execute", +) + +func MainTest() { + flag.Parse() + n := *nFlag + + m := NewSortedMap[int, int](nil) + for i := 0; i < n; i++ { + m = m.Set(i, i) + } +} |