Closed afabri closed 1 year ago
I use boost::multiprecision::number<boost::multiprecision::cpp_int_backend<512> > and perform multiplications on them. Does that mean that there should be up to 512/64 limbs not allocated dynamically?
No. That type has an internal cache size of 512 bits and no upper limit.
Use cpp_int_backend<512, 512>
if you want a non-resizable type, or better still boost::multiprecision::int512_t
I use
boost::multiprecision::number<boost::multiprecision::cpp_int_backend<512> >
and perform multiplications on them. Does that mean that there should be up to 512/64 limbs not allocated dynamically?I ask because I have only few multiplications where the result has more than 8 limbs (I create a histogram on the value returned by the helper function
cpp_int::size()
), but in vtune I see that I still spend a lot of time in theresize()
call inmultiply.h