@isuruf just as an update on the new integer class: I have implemented the string conversion changes we discussed, and now it is possible to select at compile time how many limbs you want in static storage. I worked quite a bit on the addition routines, and they are now faster than both piranha::integer and the vanilla GMP without using any 128 integer type (so they are compatible with MSVC as well). I am working now on the mul routines and on the caching.
@isuruf you mentioned the mpz cache used by SAGE earlier. How does it work exactly? Does it keep just a list of recently-used mpzs to pool from or does it categorize them in terms of how many allocated limbs they have?
what might happen (I am not sure...) is the following: when the program ends, the global static integer's dtor is called, but its dtor wants to access the cache in order to push the deallocated mpz to the cache stack
but the cache might have already been destroyed, as it is also a static variable?