Optimized get_shares

This commit is contained in:
SChernykh
2023-01-10 16:33:19 +01:00
parent 850eb8e6e0
commit 4f2ad9a93c
3 changed files with 50 additions and 28 deletions
+8
View File
@@ -208,6 +208,14 @@ struct RandomDeviceSeed
static RandomDeviceSeed instance;
};
FORCEINLINE uint64_t xorshift64star(uint64_t x)
{
x ^= x >> 12;
x ^= x << 25;
x ^= x >> 27;
return x * 0x2545F4914F6CDD1DULL;
}
FORCEINLINE uint64_t seconds_since_epoch()
{
using namespace std::chrono;