Abstract
Dynamically typed language implementations often use more memory and execute slower than their statically typed cousins, in part because operations on collections of elements are unoptimised. This paper describes storage strategies, which dynamically optimise collections whose elements are instances of the same primitive type. We implement storage strategies in the PyPy virtual machine, giving a performance increase of 18% on wide-ranging benchmarks of real Python programs. We show that storage strategies are simple to implement, needing only 1500LoC in PyPy, and have applicability to a wide range of virtual machines.
- C. S. Ananian and M. Rinard. Data size optimizations for Java programs. In phProc. LCTES, pages 59--68, 2003. Google Scholar
Digital Library
- A. W. Appel and M. J. Gonçalves. Hash-consing garbage collection. Technical Report CS-TR-412--93, Princeton University, Dept. of Computer Science, 1993.Google Scholar
- V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: a transparent dynamic optimization system. In phProc. PLDI, pages 1--12, 2000. Google Scholar
Digital Library
- M. Bayer. Orm2010, 2012. URL http://techspot.zzzeek.org. {Online; accessed 26-March-2013}.Google Scholar
- S. Bird, E. Klein, and E. Loper. phNatural Language Processing with Python. O'Reilly Media, July 2009. Google Scholar
Digital Library
- C. F. Bolz and L. Tratt. The impact of meta-tracing on VM design and implementation. phTo appear, Science of Computer Programming, 2013.Google Scholar
- C. F. Bolz, A. Cuni, M. Fijałkowski, and A. Rigo. Tracing the meta-level: PyPy's tracing JIT compiler. In phProc. ICOOOLPS, pages 18--25, 2009. Google Scholar
Digital Library
- C. F. Bolz, A. Cuni, M. Fijałkowski, M. Leuschel, S. Pedroni, and A. Rigo. Allocation removal by partial evaluation in a tracing JIT. phProc. PEPM, Jan. 2011. Google Scholar
Digital Library
- O. Callaú, R. Robbes, E. Tanter, and D. Röthlisberger. How developers use the dynamic features of programming languages: the case of smalltalk. In phProc. MSR, page 23--32, 2011. Google Scholar
Digital Library
- B. Cannon. phLocalized type inference of atomic types in Python. Master thesis, California Polytechnic State University, 2005.Google Scholar
- C. Chambers, D. Ungar, and E. Lee. An efficient implementation of SELF a dynamically-typed object-oriented language based on prototypes. In phOOPSLA, volume 24, 1989. Google Scholar
Digital Library
- C. Chambers, D. Ungar, and E. Lee. An efficient implementation of self a dynamically-typed object-oriented language based on prototypes. phSIGPLAN Not., 24: 49--70, Sept. 1989\natexlabb. Google Scholar
Digital Library
- D. Clifford. URL http://v8-io12.appspot.com/. Talk at IO12 {Online; accessed 27-June-2013}.Google Scholar
- D. Clifford, V. Egorov, and M. Stanton. Personal communication, July 2013.Google Scholar
- J. da Silva and G. Lopes. A local maxima method and a fair dispersion normalization for extracting multi-word units from corpora. In phMeeting on Mathematics of Language, 1999.Google Scholar
- FeedParser Developers. Feedparser, 2012. URL http://code.google.com/p/feedparser/. {Online; accessed 26-March-2013}.Google Scholar
- P. Fleming and J. Wallace. How not to lie with statistics: the correct way to summarize benchmark results. phCommun. ACM, 29 (3): 218--221, Mar. 1986. Google Scholar
Digital Library
- A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M. R. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, J. Ruderman, E. W. Smith, R. Reitmaier, M. Bebenita, M. Chang, and M. Franz. Trace-based Just-In-Time type specialization for dynamic languages. In phProc. PLDI, 2009. Google Scholar
Digital Library
- E. Gamma, R. Helm, R. E. Johnson, and J. Vlissides. phDesign Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Longman, Amsterdam, Oct. 1994. Google Scholar
Digital Library
- A. Georges, D. Buytaert, and L. Eeckhout. Statistically rigorous Java performance evaluation. phSIGPLAN Notices, 42 (10): 57--76, 2007. Google Scholar
Digital Library
- D. Gudeman. Representing type information in Dynamically-Typed languages. Technical Report TR93--27, University of Arizona at Tucson, 1993.Google Scholar
- B. Hackett and S.-y. Guo. Fast and precise hybrid type inference for JavaScript. In phProc. PLDI, pages 239--250, 2012. Google Scholar
Digital Library
- A. Holkner and J. Harland. Evaluating the dynamic behaviour of python applications. In phProc. ACSC, pages 19--28, 2009. Google Scholar
Digital Library
- T. Kotzmann and H. Mössenböck. Escape analysis in the context of dynamic compilation and deoptimization. In phProc. VEE, page 111--120, 2005. Google Scholar
Digital Library
- Logilab. Pylint, 2012. URL http://www.logilab.org/project/pylint. {Online; accessed 26-March-2013}.Google Scholar
- NetworkX Developers. Networkx, 2012. URL http://networkx.lanl.gov. {Online; accessed 26-March-2013}.Google Scholar
- Excelerator Developers. pyexcelerator, 2012. URL http://sourceforge.net/projects/pyexcelerator. {Online; accessed 26-March-2013}.Google Scholar
- PyPy Team. Pypy speed benchmarks, 2013. URL http://speed.pypy.org/. {Online; accessed 27-June-2013}.Google Scholar
- P. Quentel. Pydblite, 2012. URL http://www.pydblite.net/en/index.html. {Online; accessed 26-March-2013}.Google Scholar
- A. Radziszewski and M. Piasecki. A preliminary Noun Phrase Chunker for Polish. In phProc. IOS, pages 169--180. Springer, 2010. Chunker available at http://nlp.pwr.wroc.pl/trac/private/disaster/.Google Scholar
- G. Richards, S. Lebresne, B. Burg, and J. Vitek. An analysis of the dynamic behavior of JavaScript programs. In phProc. PLDI, pages 1--12, 2010. Google Scholar
Digital Library
- A. Rigo and S. Pedroni. PyPy's approach to virtual machine construction. In phProc. DLS, 2006. Google Scholar
Digital Library
- Rosetta Code. Inverted index, 2012. URL http://rosettacode.org/wiki/Inverted_index#Python. {Online; accessed 26-March-2013}.Google Scholar
- J. B. Sartor, M. Hirzel, and K. S. McKinley. No bit left behind: the limits of heap data compression. In phProc. ISSM, pages 111--120. ACM, 2008. Google Scholar
Digital Library
- L. Tratt. Dynamically typed languages. phAdvances in Computers, 77: 149--184, July 2009.Google Scholar
Cross Ref
- Whoosh Developers. Whoosh, 2012. URL https://bitbucket.org/mchaput/whoosh. {Online; accessed 26-March-2013}.Google Scholar
Index Terms
Storage strategies for collections in dynamically typed languages
Recommendations
Storage strategies for collections in dynamically typed languages
OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applicationsDynamically typed language implementations often use more memory and execute slower than their statically typed cousins, in part because operations on collections of elements are unoptimised. This paper describes storage strategies, which dynamically ...
Language-independent storage strategies for tracing-JIT-based virtual machines
DLS 2015: Proceedings of the 11th Symposium on Dynamic LanguagesStorage strategies have been proposed as a run-time optimization for the PyPy Python implementation and have shown promising results for optimizing execution speed and memory requirements. However, it remained unclear whether the approach works equally ...
Language-independent storage strategies for tracing-JIT-based virtual machines
DLS '15Storage strategies have been proposed as a run-time optimization for the PyPy Python implementation and have shown promising results for optimizing execution speed and memory requirements. However, it remained unclear whether the approach works equally ...







Comments