patch for speed
paul zimmermann
Paul.Zimmermann at inria.fr
Mon Sep 9 16:18:05 UTC 2019
Hi,
this patch adds mpz_legendre to the functions known by speed:
zimmerma at tomate:/tmp/gmp-6.1.2/tune$ ./speed -r -s 1-10 mpn_mul_n mpn_gcd mpz_legendre mpz_jacobi
overhead 0.000000001 secs, precision 10000 units of 3.04e-10 secs, CPU freq 3292.22 MHz
mpn_mul_n mpn_gcd mpz_legendre mpz_jacobi
1 #0.000000005 18.7516 26.0471 26.0335
2 #0.000000007 41.2102 50.0996 49.8808
3 #0.000000014 81.6871 87.5821 87.4862
4 #0.000000019 90.4106 97.1702 96.5991
5 #0.000000026 88.6899 95.3075 94.5296
6 #0.000000032 87.9981 92.8041 92.5853
7 #0.000000041 82.1337 86.7046 86.5697
8 #0.000000051 77.1496 81.5147 81.4188
9 #0.000000068 65.8028 69.6469 69.6326
10 #0.000000076 66.2903 69.9241 69.7451
11 #0.000000092 61.7560 65.2479 65.0786
12 #0.000000107 58.3972 61.1965 60.9988
13 #0.000000126 53.8224 56.9173 56.4985
14 #0.000000142 51.7653 55.0378 54.8534
15 #0.000000164 48.5111 51.1119 50.9965
16 #0.000000185 45.7281 48.6286 48.5163
Paul
--- speed.c.orig 2019-09-09 18:01:39.453570648 +0200
+++ speed.c 2019-09-09 18:02:01.877937859 +0200
@@ -309,6 +309,7 @@
{ "mpn_gcdext_lehmer", speed_mpn_gcdext_lehmer },
#endif
{ "mpz_jacobi", speed_mpz_jacobi },
+ { "mpz_legendre", speed_mpz_legendre },
{ "mpn_jacobi_base", speed_mpn_jacobi_base },
{ "mpn_jacobi_base_1", speed_mpn_jacobi_base_1 },
{ "mpn_jacobi_base_2", speed_mpn_jacobi_base_2 },
--- common.c.orig 2019-09-09 18:00:54.416833037 +0200
+++ common.c 2019-09-09 18:01:19.381241921 +0200
@@ -1722,6 +1722,11 @@
SPEED_ROUTINE_MPZ_JACOBI (mpz_jacobi);
}
double
+speed_mpz_legendre (struct speed_params *s)
+{
+ SPEED_ROUTINE_MPZ_JACOBI (mpz_legendre);
+}
+double
speed_mpn_jacobi_base (struct speed_params *s)
{
SPEED_ROUTINE_MPN_JACBASE (mpn_jacobi_base);
--- speed.h.orig 2019-09-09 18:02:33.074448664 +0200
+++ speed.h 2019-09-09 18:02:51.742754302 +0200
@@ -393,6 +393,7 @@
double speed_mpz_init_clear (struct speed_params *);
double speed_mpz_init_realloc_clear (struct speed_params *);
double speed_mpz_jacobi (struct speed_params *);
+double speed_mpz_legendre (struct speed_params *);
double speed_mpz_lucnum_ui (struct speed_params *);
double speed_mpz_lucnum2_ui (struct speed_params *);
double speed_mpz_mod (struct speed_params *);
More information about the gmp-devel
mailing list