DocumentCode
3686734
Title
Performance research and optimization on CPython´s interpreter
Author
Huaxiong Cao;Naijie Gu;Kaixin Ren;Yi Li
Author_Institution
Dept. of Comput. Sci. &
fYear
2015
Firstpage
435
Lastpage
441
Abstract
In this paper, the performance research on CPython´s latest interpreter is presented, concluding that bytecode dispatching takes about 25 percent of total execution time on average. Based on this observation, a novel bytecode dispatching mechanism is proposed to reduce the time spent on this phase to a minimum. With this mechanism, the blocks associated with each kind of bytecodes are rewritten in hand-tuned assembly, their opcodes are renumbered, and their memory spaces are rescheduled. With these preparations, this new bytecode dispatching mechanism replaces the time-consuming memory reading operations with rapid operations on registers. This mechanism is implemented in CPython-3.3.0. Experiments on lots of benchmarks demonstrate its correctness and efficiency. The comparison between original CPython and optimized CPython shows that this new mechanism achieves about 8.5 percent performance improvement on average. For some particular benchmarks, the maximum improvement is up to 18 percentages.
Keywords
"Dispatching","Benchmark testing","Binary codes","Switches","Optimization","Registers","Instruction sets"
Publisher
ieee
Conference_Titel
Computer Science and Information Systems (FedCSIS), 2015 Federated Conference on
Type
conf
DOI
10.15439/2015F139
Filename
7321477
Link To Document