[pypy-commit] extradoc extradoc: mention why we expect guards to fail often

cfbolz noreply at buildbot.pypy.org
Thu Aug 16 11:43:18 CEST 2012


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: extradoc
Changeset: r4593:87c311cdfe4c
Date: 2012-08-15 13:17 +0200
http://bitbucket.org/pypy/extradoc/changeset/87c311cdfe4c/

Log:	mention why we expect guards to fail often

diff --git a/talk/vmil2012/paper.tex b/talk/vmil2012/paper.tex
--- a/talk/vmil2012/paper.tex
+++ b/talk/vmil2012/paper.tex
@@ -121,7 +121,6 @@
 
 
 %___________________________________________________________________________
-\todo{mention somewhere that it is to be expected that most guards do not fail}
 \section{Introduction}
 
 \todo{the introduction needs some work}
@@ -715,7 +714,7 @@
 information efficiently and also to make sure that guard checks are executed
 quickly.
 
-\subsection{Overhead of Guards}
+\subsection{Space Overhead of Guards}
 \label{sub:guard_overhead}
 \begin{figure}
     \include{figures/resume_data_table}
@@ -755,7 +754,7 @@
     \include{figures/backend_table}
     \caption{Total size of generated machine code and resume data}
     \label{fig:backend_data}
-\end{figure}
+\end{figure}e.
 
 Why the efficient storing of the resume data is a central concern in the design
 of guards is illustrated by Figure~\ref{fig:resume_data_sizes}. This figure shows
@@ -805,6 +804,14 @@
 fail it is important to make sure that the successful execution of a guard does
 not have unnecessary overhead.
 
+This low guard failure rate is expected. Most guards do not come from actual
+control flow divergences in the user program, but from type checks needed for
+type specialization. Various prior work has
+shown~\cite{holkner_evaluating_2009, richards_analysis_2010, callau_how_2011}
+that most programs in dynamic languages only use a limited amount of runtime
+variability. Therefore many guards are needed for making the traces behave
+correctly in all cases but fail rarely.
+
 
 \section{Related Work}
 \label{sec:Related Work}
diff --git a/talk/vmil2012/zotero.bib b/talk/vmil2012/zotero.bib
--- a/talk/vmil2012/zotero.bib
+++ b/talk/vmil2012/zotero.bib
@@ -27,6 +27,20 @@
 	pages = {39--50}
 },
 
+ at inproceedings{holkner_evaluating_2009,
+	address = {Wellington, New Zealand},
+	title = {Evaluating the dynamic behaviour of Python applications},
+	isbn = {978-1-920682-72-9},
+	url = {http://portal.acm.org/citation.cfm?id=1862665},
+	abstract = {The Python programming language is typical among dynamic languages in that programs written in it are not susceptible to static analysis. This makes efficient static program compilation difficult, as well as limiting the amount of early error detection that can be performed. Prior research in this area tends to make assumptions about the nature of programs written in Python, restricting the expressiveness of the language. One may question why programmers are drawn to these languages at all, if only to use them in a static-friendly style. In this paper we present our results after measuring the dynamic behaviour of 24 production-stage open source Python programs. The programs tested included arcade games, {GUI} applications and non-interactive batch programs. We found that while most dynamic activity occurs during program startup, dynamic activity after startup cannot be discounted entirely.},
+	booktitle = {Proceedings of the Thirty-Second Australasian Conference on Computer Science - Volume 91},
+	publisher = {Australian Computer Society, Inc.},
+	author = {Holkner, Alex and Harland, James},
+	year = {2009},
+	keywords = {dynamic languages, python and compilers},
+	pages = {19--28}
+},
+
 @inproceedings{bebenita_spur:_2010,
 	address = {{Reno/Tahoe}, Nevada, {USA}},
 	title = {{SPUR:} a trace-based {JIT} compiler for {CIL}},
@@ -42,6 +56,21 @@
 	keywords = {cil, dynamic compilation, javascript, just-in-time, tracing}
 },
 
+ at inproceedings{richards_analysis_2010,
+	address = {Toronto, Ontario, Canada},
+	title = {An analysis of the dynamic behavior of {JavaScript} programs},
+	isbn = {978-1-4503-0019-3},
+	url = {http://portal.acm.org/citation.cfm?id=1806598},
+	doi = {10.1145/1806596.1806598},
+	abstract = {The {JavaScript} programming language is widely used for web programming and, increasingly, for general purpose computing. As such, improving the correctness, security and performance of {JavaScript} applications has been the driving force for research in type systems, static analysis and compiler techniques for this language. Many of these techniques aim to reign in some of the most dynamic features of the language, yet little seems to be known about how programmers actually utilize the language or these features. In this paper we perform an empirical study of the dynamic behavior of a corpus of widely-used {JavaScript} programs, and analyze how and why the dynamic features are used. We report on the degree of dynamism that is exhibited by these {JavaScript} programs and compare that with assumptions commonly made in the literature and accepted industry benchmark suites.},
+	booktitle = {Proceedings of the 2010 {ACM} {SIGPLAN} conference on Programming language design and implementation},
+	publisher = {{ACM}},
+	author = {Richards, Gregor and Lebresne, Sylvain and Burg, Brian and Vitek, Jan},
+	year = {2010},
+	keywords = {dynamic behavior, dynamic metrics, execution tracing, javascript, program analysis},
+	pages = {1--12}
+},
+
 @inproceedings{kotzmann_escape_2005,
 	address = {New York, {NY}, {USA}},
 	series = {{VEE} '05},
@@ -85,6 +114,23 @@
 	pages = {9:1&#8211;9:8}
 },
 
+ at inproceedings{callau_how_2011,
+	address = {New York, {NY}, {USA}},
+	series = {{MSR} '11},
+	title = {How developers use the dynamic features of programming languages: the case of smalltalk},
+	isbn = {978-1-4503-0574-7},
+	shorttitle = {How developers use the dynamic features of programming languages},
+	url = {http://doi.acm.org/10.1145/1985441.1985448},
+	doi = {10.1145/1985441.1985448},
+	abstract = {The dynamic and reflective features of programming languages are powerful constructs that programmers often mention as extremely useful. However, the ability to modify a program at runtime can be both a boon-in terms of flexibility-, and a curse-in terms of tool support. For instance, usage of these features hampers the design of type systems, the accuracy of static analysis techniques, or the introduction of optimizations by compilers. In this paper, we perform an empirical study of a large Smalltalk codebase- often regarded as the poster-child in terms of availability of these features-, in order to assess how much these features are actually used in practice, whether some are used more than others, and in which kinds of projects. These results are useful to make informed decisions about which features to consider when designing language extensions or tool support.},
+	booktitle = {Proceedings of the 8th Working Conference on Mining Software Repositories},
+	publisher = {{ACM}},
+	author = {Calla&#250;, Oscar and Robbes, Romain and Tanter, &#201;ric and R&#246;thlisberger, David},
+	year = {2011},
+	keywords = {dynamic languages, smalltalk, static analysis},
+	pages = {23&#8211;32}
+},
+
 @article{wurthinger_array_2009,
 	title = {Array bounds check elimination in the context of deoptimization},
 	volume = {74},


More information about the pypy-commit mailing list