2,970 research outputs found
Speculative Staging for Interpreter Optimization
Interpreters have a bad reputation for having lower performance than
just-in-time compilers. We present a new way of building high performance
interpreters that is particularly effective for executing dynamically typed
programming languages. The key idea is to combine speculative staging of
optimized interpreter instructions with a novel technique of incrementally and
iteratively concerting them at run-time.
This paper introduces the concepts behind deriving optimized instructions
from existing interpreter instructions---incrementally peeling off layers of
complexity. When compiling the interpreter, these optimized derivatives will be
compiled along with the original interpreter instructions. Therefore, our
technique is portable by construction since it leverages the existing
compiler's backend. At run-time we use instruction substitution from the
interpreter's original and expensive instructions to optimized instruction
derivatives to speed up execution.
Our technique unites high performance with the simplicity and portability of
interpreters---we report that our optimization makes the CPython interpreter up
to more than four times faster, where our interpreter closes the gap between
and sometimes even outperforms PyPy's just-in-time compiler.Comment: 16 pages, 4 figures, 3 tables. Uses CPython 3.2.3 and PyPy 1.
JIDT: An information-theoretic toolkit for studying the dynamics of complex systems
Complex systems are increasingly being viewed as distributed information
processing systems, particularly in the domains of computational neuroscience,
bioinformatics and Artificial Life. This trend has resulted in a strong uptake
in the use of (Shannon) information-theoretic measures to analyse the dynamics
of complex systems in these fields. We introduce the Java Information Dynamics
Toolkit (JIDT): a Google code project which provides a standalone, (GNU GPL v3
licensed) open-source code implementation for empirical estimation of
information-theoretic measures from time-series data. While the toolkit
provides classic information-theoretic measures (e.g. entropy, mutual
information, conditional mutual information), it ultimately focusses on
implementing higher-level measures for information dynamics. That is, JIDT
focusses on quantifying information storage, transfer and modification, and the
dynamics of these operations in space and time. For this purpose, it includes
implementations of the transfer entropy and active information storage, their
multivariate extensions and local or pointwise variants. JIDT provides
implementations for both discrete and continuous-valued data for each measure,
including various types of estimator for continuous data (e.g. Gaussian,
box-kernel and Kraskov-Stoegbauer-Grassberger) which can be swapped at run-time
due to Java's object-oriented polymorphism. Furthermore, while written in Java,
the toolkit can be used directly in MATLAB, GNU Octave, Python and other
environments. We present the principles behind the code design, and provide
several examples to guide users.Comment: 37 pages, 4 figure
Analyzing the Adoption Rate of Local Variable Type Inference in Open-source Java 10 Projects
Type Inference is used in programming languages to improve writability. In this paper, we will be looking more specifically at Local Variable Type Inference (LVTI). For those unfamiliar with LVTI, we will also give an in-depth explanation of what it is and how it works. There is a lot of debate surrounding Type Inference in modern day programming languages. More specifically, whether the costs associated with LVTI outweigh the benefits. It has found its way into many higher-level languages including C#, C++, JavaScript, Swift, Kotlin, Rust, Go, etc. In this paper, we will look at the usefulness of LVTI and its popularity since the release of Java 10. Our study will show that LVTI in Java has not received widespread adoption. We will also explain a possible reason for this is based on the information we have gather from our empirical study which involved statically analyzing 6 popular open source Java 10 projects. We will also discuss different scenarios in which Type Inference can obscure different programming errors
Estimating Complexity of Programs in Python Language
In this paper, a complexity metric for Python language is formulated. Since Python is an object oriented language, the present metric is capable to evaluate any
object-oriented language.We validate our metric with case study, comparative study and empirical validation. The case study is in Python, Java andC++ and the
results prove that Python is better than other object-oriented languages. Later, we validate the metric empirically with a real project, which is developed in
Python
- …