GMP use in vcpkg on Windows

Neill Clift NeillClift at live.com
Wed Sep 22 16:54:07 UTC 2021


Hi Marc,

>On a unix-like system (including mingw64 for windows), GMP's configure can detect the build system (epyc, broadwell, etc) and compile specifically for this system. Or you can use --enable-fat to get some runtime detection >of the system (more portable but a bit less efficient). I don't know what they did for vcpkg. You could try building GMP from source with mingw64.

After a lot of playing I managed to compile up GMP on windows using MSYS2. I had to build the dynamic linked library as I didn't know how to satisfy some of the missing symbols.
It's quite hard to find instructions for doing this.
I got a 4% improvement from doing this. I see the divide code now using bsr to do lzcnt so that makes more sense to me.
Thanks for your help.
Neill.


More information about the gmp-discuss mailing list