piranha icon indicating copy to clipboard operation
piranha copied to clipboard

Switch to ``long long`` as the default type for ``kronecker_monomial``

Open bluescarni opened this issue 9 years ago • 1 comments

Currently the default type for kronecker_monomial<T> is T == std::make_signed<std::size_t>::type, that is, the signed counterpart of size_t. The idea behind this choice is that the signed counterpart of size_t is likely to be the largest "fast" signed integer type available on the platform. For use in kronecker_monomial, T should be as fast and as large as possible.

However, recent testing on a raspberry pi2, which is a 32-bit architecture, shows that the 32-bit signed counterpart of size_t (that is, long) is only marginally faster that long long (which is 64 bit on this arch), while providing much less range. It thus seems to make sense to change the heuristic to just pick the largest among the standard C++ integral types, long long.

bluescarni avatar Feb 02 '16 15:02 bluescarni

This should also be done for the real trigonometric Kronecker monomial class.

bluescarni avatar Feb 20 '16 23:02 bluescarni