Nikos Mavrogiannopoulos <[email protected]> writes: > Hmm even after --enable-fat was given to gmp not much has changed. > > My CPU is Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz and that's what I > see: > > 1. gmp without --enable-fat > rsa 2048 0.8881 27.1422 > > 2. gmp with --enable-fat > rsa 2048 1.0973 40.4561 > > 3. gmp with --enable-fat compiled outside distribution (as ./configure > --enable-fat) > rsa 2048 1.5127 53.6693
That's quite a big difference. > The corresponding value on that cpu for openssl's RSA is: > rsa (openssl) 2048 1.9212 61.4107 > > So it may be that it is quite hard to get good values out of gmp > without having a custom compilation. In particular I see that locally I > have: > -mtune=skylake -march=broadwell -fomit-frame-pointer > > while fedora sets: -mtune=generic and the --enable-fat is not > sufficient to overcome this. Those flags should only affect the code generated by the C compiler, and I'd expect all critical loops to be in assembly on your machine. But --enable-fat is more than just selecting the right assembly code at runtime, also various thresholds should be set depending on the cpu type. What performance do you get from a default (non-fat) build on your machine? The default will select code and thresholds based on (the gmp-specific) config.guess. Maybe send a mail to the gmp-discuss or gmp-bugs list and ask for advice (see https://gmplib.org/#MAILINGLISTS)? Don't forget to say precisely which GMP version you're using. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. _______________________________________________ nettle-bugs mailing list [email protected] http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs
