summaryrefslogtreecommitdiff
path: root/test/math/permIndex.cpp
diff options
context:
space:
mode:
authorGloria Mundi <gloria@gloria-mundi.eu>2025-11-19 02:20:56 +0100
committerGloria Mundi <gloria@gloria-mundi.eu>2025-11-19 02:20:56 +0100
commit17232918b51d27500af905dc3d3d82cd43d6ddf5 (patch)
tree1c5d52f03eead415cc53317008032fe84238c187 /test/math/permIndex.cpp
parentbf4eda36d4c13be468236bf33baa2574e8692ca7 (diff)
parentcdeded176c18240579168ee8461c5101abb47e78 (diff)
merge mzuenni
Diffstat (limited to 'test/math/permIndex.cpp')
-rw-r--r--test/math/permIndex.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/math/permIndex.cpp b/test/math/permIndex.cpp
index d68ba3a..2f19985 100644
--- a/test/math/permIndex.cpp
+++ b/test/math/permIndex.cpp
@@ -1,9 +1,9 @@
#include "../util.h"
#include <math/permIndex.cpp>
-void stress_test() {
+void stress_test(int LIM) {
ll queries = 0;
- for (ll i = 0; i < 10'000; i++) {
+ for (int i = 0; i < LIM; i++) {
int n = Random::integer<int>(1, 100);
vector<ll> cur(n);
iota(begin(cur), end(cur), 0);
@@ -32,7 +32,8 @@ void performance_test() {
}
int main() {
- stress_test();
- performance_test();
+ stress_test(1'000);
+ if (!sanitize) stress_test(10'000);
+ if (!sanitize) performance_test();
}