{'fraction_non_alphanumeric': 0.02347024308466052, 'fraction_numerical': 0.0, 'mean_word_length': 5.091836734693878, '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}}
Improving HTM Scaling with Consistency-Oblivious Programming

We implemented two data structures in a consistency-oblivious programming (COP) style: a red black tree and a dynamic cacheoblivious B-tree. Unlike a naive transactional style, in which an operation such as an insertion is enclosed in a hardware transaction, in a COP-style there are two phases: an oblivious phase that runs with no transactions or locking, and an atomic phase that simply verifies that the oblivious phase operated correctly. If the verification fails, we retry, and then fallback to performing the transaction while holding a lock. We used the Intel hardware transactional memory instructions to implement the atomic phase. We found that the COP approach provides a performance improvement of more than a factor of five over a naive HTM transaction for high threadcount read-only workloads, and a factor of four for high threadcount read/write workloads. To achieve good performance when using HTM, one must distinguish between failures that are likely to succeed upon retry (for example, a conflict on the lock) from failures that indicate real conflicts (such as two threads both modifying the data structure).