aboutsummaryrefslogtreecommitdiff
path: root/tests/benchmarks/vector-prepend
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/vector-prepend')
l---------tests/benchmarks/vector-prepend/main.go1
-rw-r--r--tests/benchmarks/vector-prepend/pds.go23
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/benchmarks/vector-prepend/main.go b/tests/benchmarks/vector-prepend/main.go
new file mode 120000
index 0000000..f67563d
--- /dev/null
+++ b/tests/benchmarks/vector-prepend/main.go
@@ -0,0 +1 @@
+../../main.go \ No newline at end of file
diff --git a/tests/benchmarks/vector-prepend/pds.go b/tests/benchmarks/vector-prepend/pds.go
new file mode 100644
index 0000000..4f82cea
--- /dev/null
+++ b/tests/benchmarks/vector-prepend/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
+
+ l := NewVector[int]()
+ for i := 0; i < n; i++ {
+ l = l.Prepend(i)
+ }
+}