CPL - Chalmers Publication Library
| Utbildning | Forskning | Styrkeområden | Om Chalmers | In English In English Ej inloggad.

Efficient Evaluation for Untyped and Compositional Representations of Expressions

Emil Axelsson (Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers))
Göteborg : Chalmers University of Technology, 2014. - 17 s.

This report gives a simple implementation of A. Baars and S.D. Swierstra's "Typing Dynamic Typing" using modern (GHC) Haskell features, and shows that the technique is especially beneficial in a compositional setting, where parts of the expression are defined separately. Evaluating expressions that are represented as algebraic data types typically requires using tagged unions to represent values. Tagged unions can introduce runtime overhead due to tag checking, and this overhead is unnecessary if the evaluated expression is well-typed. Likewise, pattern matching on the constructors of the expression causes overhead which is unnecessary if the same expression is evaluated multiple times. Typing Dynamic Typing solves both of these problems by deferring all tag checking to an initial "dynamic compilation" phase after which evaluation proceeds without any tag checking or pattern matching. The problems of tag checking and pattern matching are worse in a compositional setting, and our measurements show that the technique gives especially good performance gains for compositional expressions.

Den här publikationen ingår i följande styrkeområden:

Läs mer om Chalmers styrkeområden  

Denna post skapades 2015-01-09.
CPL Pubid: 210441