+ 1 -

JIT control flow optimization python

Allocation Removal by Partial Evaluation in a Tracing JIT

Carl Friedrich Bolz Antonio Cunia Maciej Fijałkowski Michael Leuschel Samuele Pedroni Armin Rigo (2010)

The performance of many dynamic language implementations suffers from high allocation rates and runtime type checks. This makes dynamic languages less applicable to purely algorithmic problems, despite their growing popularity. In this paper we present a simple compiler optimization based on online partial evaluation to remove object allocations and runtime type checks in the context of a tracing JIT. We evaluate the optimization using a Python VM and find that it gives good results for all our (real-life) benchmarks.

Un commentaire

Lire maintenant ?

+ 1 -

language design control flow error handling syntax

Exceptional syntax

Nick Benton Andrew Kennedy (2001)

From the points of view of programming pragmatics, rewriting and operational semantics, the syntactic construct used for exception handling in ML-like programming languages, and in much theoretical work on exceptions, has subtly undesirable features. We propose and discuss a more well-behaved construct.

Un commentaire

Lire maintenant ?

+ 1 -

language design control flow yield coroutines continuations delimited continuations

Yield : Mainstream Delimited Continuations

Roshan P. James Amr Sabry (2011)

Many mainstream languages have operators named yield that share common semantic roots but differ significantly in their details. We present the first known formal study of these mainstream yield operators, unify their many semantic differences, adapt them to to a functional setting, and distill the operational semantics and type theory for a generalized yield operator. The resultant yield, with its delimiter run, turns out to be a delimited control operator of comparable expressive power to shift-reset, with translations from one to the other. The mainstream variants of yield turn out to be one-shot or linearly used restrictions of delimited continuations. These connections may serve as a means of transporting ideas from the rich theory on delimited continuations to mainstream languages which have largely shied away from them. Dually, the restrictions of the various existing yield operations may be treated as shift-reset variants that have found mainstream acceptance and thus worthy of study.

Un commentaire

Lire maintenant ?