Performance tuning


Detailed Description

These settings can be changed to tune the performance on different platforms.


Defines

#define WORD_BITS   32
 The size of the words that are used to store the bit vectors.
#define BITCOUNT_BITS   11
 The size of the precomputed arrays of bit counts.

Typedefs

typedef unsigned bitcount_t
 The type which is used to store the bit counts.


Define Documentation

#define BITCOUNT_BITS   11

The size of the precomputed arrays of bit counts.

Possible values: 8, 11 or 16. Each word is divided into fragments of length BITCOUNT_BITS. An array is used to look up the number of ones in each fragment. The largest value is not necessarily the best, as smaller arrays may be more cache-friendly; on Pentium 4 platform, the value 11 seems to be the best choice.

Definition at line 79 of file types.c.

Referenced by bitcount(), and init_bitcount().

#define WORD_BITS   32

The size of the words that are used to store the bit vectors.

Possible values: 32 and 64.

Definition at line 73 of file types.c.

Referenced by bitcount(), and process_input().


Typedef Documentation

typedef unsigned bitcount_t

The type which is used to store the bit counts.

The maximum value that needs to be stored is WORD_BITS, therefore any unsigned type is ok.

Definition at line 84 of file types.c.