{'fraction_non_alphanumeric': 0.020055325034578148, 'fraction_numerical': 0.006915629322268326, 'mean_word_length': 5.488789237668161, '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}}
An Improved Programming Model for Thread-Level Speculation

Thread-Level speculation (TLS) is an automatic parallel technique, which partitions sequential programs with data dependencies into multithreads to be executed in parallel on the multi-core platform, and it is used to aggressively exploit the parallelism of sequential programs at runtime. However, the existing implementations of the software TLS models always incur extra and high overhead, even could be revoking performance benefits from TLS when frequent data dependencies are violated. Based on the POSIX thread library, which has a high portability, this paper proposes an improved TLS programming model to exploit potential parallelism of the sequential programs. Firstly, the execution model of the proposed programming model adopts the optimized main-assistance-work thread mechanism to improve overall operational efficiency. And then a new data structure is proposed and designed to implement a thread-level speculation mechanism for solving the thread version copy. Using the benchmarks, experimental results show that the proposed TLS programming model can acquire a significant increase in speedup on a multi-core platform and the proposed TLS programming model has excellent performance benefits. Compared with the traditional TLS programming model, the improved TLS model can achieve a speedup of 2.87 to 12.22 which delivers a 9.70% performance improvement on average.