8,721 research outputs found
Fine-grained Language Composition: A Case Study
Although run-time language composition is common, it normally takes the form
of a crude Foreign Function Interface (FFI). While useful, such compositions
tend to be coarse-grained and slow. In this paper we introduce a novel
fine-grained syntactic composition of PHP and Python which allows users to
embed each language inside the other, including referencing variables across
languages. This composition raises novel design and implementation challenges.
We show that good solutions can be found to the design challenges; and that the
resulting implementation imposes an acceptable performance overhead of, at
most, 2.6x.Comment: 27 pages, 4 tables, 5 figure
Approaches to Interpreter Composition
In this paper, we compose six different Python and Prolog VMs into 4 pairwise
compositions: one using C interpreters; one running on the JVM; one using
meta-tracing interpreters; and one using a C interpreter and a meta-tracing
interpreter. We show that programs that cross the language barrier frequently
execute faster in a meta-tracing composition, and that meta-tracing imposes a
significantly lower overhead on composed programs relative to mono-language
programs.Comment: 33 pages, 1 figure, 9 table
Making an Embedded DBMS JIT-friendly
While database management systems (DBMSs) are highly optimized, interactions
across the boundary between the programming language (PL) and the DBMS are
costly, even for in-process embedded DBMSs. In this paper, we show that
programs that interact with the popular embedded DBMS SQLite can be
significantly optimized - by a factor of 3.4 in our benchmarks - by inlining
across the PL / DBMS boundary. We achieved this speed-up by replacing parts of
SQLite's C interpreter with RPython code and composing the resulting
meta-tracing virtual machine (VM) - called SQPyte - with the PyPy VM. SQPyte
does not compromise stand-alone SQL performance and is 2.2% faster than SQLite
on the widely used TPC-H benchmark suite.Comment: 24 pages, 18 figure
MCViNE -- An object oriented Monte Carlo neutron ray tracing simulation package
MCViNE (Monte-Carlo VIrtual Neutron Experiment) is a versatile Monte Carlo
(MC) neutron ray-tracing program that provides researchers with tools for
performing computer modeling and simulations that mirror real neutron
scattering experiments. By adopting modern software engineering practices such
as using composite and visitor design patterns for representing and accessing
neutron scatterers, and using recursive algorithms for multiple scattering,
MCViNE is flexible enough to handle sophisticated neutron scattering problems
including, for example, neutron detection by complex detector systems, and
single and multiple scattering events in a variety of samples and sample
environments. In addition, MCViNE can take advantage of simulation components
in linear-chain-based MC ray tracing packages widely used in instrument design
and optimization, as well as NumPy-based components that make prototypes useful
and easy to develop. These developments have enabled us to carry out detailed
simulations of neutron scattering experiments with non-trivial samples in
time-of-flight inelastic instruments at the Spallation Neutron Source. Examples
of such simulations for powder and single-crystal samples with various
scattering kernels, including kernels for phonon and magnon scattering, are
presented. With simulations that closely reproduce experimental results,
scattering mechanisms can be turned on and off to determine how they contribute
to the measured scattering intensities, improving our understanding of the
underlying physics.Comment: 34 pages, 14 figure
- …