diff --git a/equi_miner.h b/equi_miner.h index 3ddd5fc..97cf188 100644 --- a/equi_miner.h +++ b/equi_miner.h @@ -41,16 +41,28 @@ typedef u32 au32; // 2_log of number of buckets #define BUCKBITS (DIGITBITS-RESTBITS) +#ifndef SAVEMEM +#if RESTBITS == 4 +// can't save memory in such small buckets +#define SAVEMEM 1 +#elif RESTBITS >= 8 +// take advantage of law of large numbers (sum of 2^8 random numbers) +// this reduces (200,9) memory to under 144MB, with negligible discarding +#define SAVEMEM 9/14 +#endif +#endif + // number of buckets static const u32 NBUCKETS = 1<