4 ms·
Note that soon after I posted this, Someone noticed[1,2] that it is possible avoid a whole lot of work, but I am still glad I realized how much performance one
by nanis 5y ago
Note that soon after I posted this, Someone noticed[1,2] that it is possible avoid a whole lot of work, but I am still glad I realized how much performance one can gain by dropping GMP in favor of `__int128`.
It seems like for numbers on this side of 1024 bits, writing purpose-built routines using `__int128` or SSE/AVX instructions rather than general functionality is likely to pay off.
[1]: https://news.ycombinator.com/item?id=10915461 https://news.ycombinator.com/item?id=10915461
[2]: https://www.nu42.com/2016/01/excellent-numbers-explicit-solution.html https://www.nu42.com/2016/01/excellent-numbers-explicit-solu...