[multiprecision] 128 bit integer support on Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[multiprecision] 128 bit integer support on Windows

Boost - Users mailing list

Hi,

I managed to get boost multi-precision to work with 128 bit integers on Windows using clang.

I had to change this in clang.hpp:

 

#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER) ß- remove this last thing

#  define BOOST_HAS_INT128

#endif

 

Clang-cl defines _MSC_VER for compat I guess.

I had to pull in the library clang_rt.builtins-x86_64.lib for two routines needed for division and remainder.

 

For my particular application I only saw a 10% improvement in performance.

 

I am wondering if there are other things that need to be changed to get better performance? My program deals with integers of various sizes so it might be an artifact of the sizes of integers I mostly do operations on.

I was expecting a bigger return. I am seeing the most expensive routine being _udivmodti4 on profiling. Division wasn’t showing up as much in the traces before I made the change.

Thanks.

Neill.

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users