From 8a2cc3425848fef02e282071f4d343963854fa0d Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 8 Mar 2023 06:28:08 +0000 Subject: 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. --- src/regress/lib/libcrypto/bn/bn_isqrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/regress/lib/libcrypto/bn/bn_isqrt.c b/src/regress/lib/libcrypto/bn/bn_isqrt.c index b1cacea1cd..2663bb74e9 100644 --- a/src/regress/lib/libcrypto/bn/bn_isqrt.c +++ b/src/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 -- cgit v1.2.3-55-g6feb