{'fraction_non_alphanumeric': 0.01847826086956522, 'fraction_numerical': 0.005434782608695652, 'mean_word_length': 5.059210526315789, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A fast bit-counting algorithm

Various information retrieval problems encounter time-consuming bit-counting operations. For example, to choose a rational access strategy it is necessary to repeatedly evaluate the cardinalities of retrieved sets of information items. A straightforward implementation of this procedure involves shifting of data words which makes the time of bit-counting proportional to the length of the machine word. In the suggested implementation, bit-counting is done with machine words as a whole by emulating the summation through some bitwise logical operations. It turns out, that for 32 bits this algorithm runs more than 3 times faster than conventional horizontal methods and is comparable to all other methods for typical random number cases. It is better than all methods in the worst case. In future computers, with 64-bit words and bigger the gain in speed will be correspondingly higher.