{'fraction_non_alphanumeric': 0.019230769230769232, 'fraction_numerical': 0.0007396449704142012, 'mean_word_length': 5.473684210526316, '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}}
Comparative research on Python speed optimization strategies

Python script language offers high development efficiency, abundant and versatile libraries; as a result nowadays it is used in a wide range of research projects and products domains. However, Python's interpretation characteristic becomes a speed bottleneck in some case, especially for extensive numerical operations. To solve this problem, many technologies to optimize Python are proposed. In this paper, we summarize the existing technologies and catalog them into 3 classes. The principles of respective technologies are explained. Experiments on representative Python codes are carried out, and then the speed performance, advantages and disadvantages are compared and explained in details. The experiment results reveal that Python codes can speed up by using feasible algorithm, or caching policies without resort to any external tools. Tools, such as Shed-skin and psyco, can enhance the speed performance with the minimal modification on original Python code models. Using extension libraries in static languages has a great advantage over other methods in the efficiency, which can supply a very higher speed raise. Thus in a particular situation, in order to get a desirable performance, the user should choose and resort to applicable technology according to the requirements.