Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
The effect of unrolling and inlining for Python bytecode optimizations
Ben Asher Y., Rotem N.  SYSTOR 2009 (Proceedings of the 2009 Israeli Experimental Systems Conference, Haifa, Israel, May 4-6, 2009)1-14.2009.Type:Proceedings
Date Reviewed: Aug 5 2009

Programs written in the Python scripting language are compiled into bytecode and executed by an interpreter. Runtime performance is influenced by bytecode quality. This paper examines how bytecode transformations can improve bytecode quality. The transformations preprocess bytecode, using function inlining and loop unrolling to expose more code, and then apply dataflow optimizations, such as constant propagation and loop-invariant code motion.

Python is dynamically typed, making the traditional compiler-based static type analysis difficult; in addition, static analysis runs counter to Python’s interactive development style. This paper replaces static type analysis with filtering rules that dynamically identify code segments to which transformations can be safely applied. Loop unrolling is augmented with array index substitution, creating more opportunities for dataflow transformations after unrolling, such as replacing redundant array references with fast immediate variables.

Experiments show that the transformations provide spectacular improvements (100 to 1,000 percent) on benchmarks and microkernel code, and much more modest--but still good--improvements (20 to 30 percent) on difficult cryptographic code.

This paper requires a modest knowledge of either Python or language optimization. The general theory behind the transformations is described in detail, but no implementation details are presented or cited. The prose is awkward, using clumsy passive-voice constructions and sentences. The bibliography serves the paper, if not the large and rather haphazard field of scripting language optimization.

Reviewer:  R. Clayton Review #: CR137167 (1011-1153)
Bookmark and Share
 
Interpreters (D.3.4 ... )
 
 
Optimization (D.3.4 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Interpreters": Date
The APL IL Interpreter Generator
Alfonseca M., Selby D., Wilks R. IBM Systems Journal 30(4): 490-497, 1991. Type: Article
Dec 1 1993
Optimizing static scope LISP by repetitive interpretation of recursive functions calls
Felgentreu K., Lippe W., Simon F. IEEE Transactions on Software Engineering SE-13(6): 628-635, 1987. Type: Article
Mar 1 1988
Implementation of an interpreter for abstract equations
Hoffmann C., O’Donnell M., Strandh R. Software--Practice & Experience 15(12): 1185-1204, 1985. Type: Article
Jul 1 1986
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy