diff options
author | EuAndreh <eu@euandre.org> | 2025-01-22 07:44:09 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-01-22 07:51:07 -0300 |
commit | 342945dc4ff166517fb89e38f28e027e3b71f8c8 (patch) | |
tree | fb63c8bf13121c3a98b0eb73551ff548a566b8cf /tests/benchmarks/vector-set | |
parent | tests/pds.go: Init removal of "testing" usage (diff) | |
download | pds-342945dc4ff166517fb89e38f28e027e3b71f8c8.tar.gz pds-342945dc4ff166517fb89e38f28e027e3b71f8c8.tar.xz |
s/List/Vector/g
Diffstat (limited to 'tests/benchmarks/vector-set')
l--------- | tests/benchmarks/vector-set/main.go | 1 | ||||
-rw-r--r-- | tests/benchmarks/vector-set/pds.go | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/benchmarks/vector-set/main.go b/tests/benchmarks/vector-set/main.go new file mode 120000 index 0000000..f67563d --- /dev/null +++ b/tests/benchmarks/vector-set/main.go @@ -0,0 +1 @@ +../../main.go
\ No newline at end of file diff --git a/tests/benchmarks/vector-set/pds.go b/tests/benchmarks/vector-set/pds.go new file mode 100644 index 0000000..ce0ee55 --- /dev/null +++ b/tests/benchmarks/vector-set/pds.go @@ -0,0 +1,27 @@ +package pds + +import ( + "flag" +) + + + +var nFlag = flag.Int( + "n", + 1_000, + "The number of iterations to execute", +) + +func MainTest() { + flag.Parse() + n := *nFlag + + l := NewVector[int]() + for i := 0; i < n; i++ { + l = l.Append(i) + } + + for i := 0; i < n; i++ { + l = l.Set(i, i * 10) + } +} |