From d79da6ce10b90eb9ae0482dd79daa5bf48fdff47 Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 8 Mar 2023 06:28:08 +0000 Subject: [PATCH] bn_isqrt: reduce number of tests to 100. The runtime is roughly quadratic in N_TESTS. While it only takes 1-2s on modern machines, this test takes a long time on slow machines. A reduction of runtime by a factor of ~16 is significant. --- regress/lib/libcrypto/bn/bn_isqrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regress/lib/libcrypto/bn/bn_isqrt.c b/regress/lib/libcrypto/bn/bn_isqrt.c index b1cacea1cd2..2663bb74e94 100644 --- a/regress/lib/libcrypto/bn/bn_isqrt.c +++ b/regress/lib/libcrypto/bn/bn_isqrt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_isqrt.c,v 1.2 2022/12/06 18:23:29 tb Exp $ */ +/* $OpenBSD: bn_isqrt.c,v 1.3 2023/03/08 06:28:08 tb Exp $ */ /* * Copyright (c) 2022 Theo Buehler * @@ -26,7 +26,7 @@ #include "bn_local.h" -#define N_TESTS 400 +#define N_TESTS 100 /* Sample squares between 2^128 and 2^4096. */ #define LOWER_BITS 128 -- 2.20.1