Planned intervention: On Wednesday April 3rd 05:30 UTC Zenodo will be unavailable for up to 2-10 minutes to perform a storage cluster upgrade.
Published September 11, 2019 | Version v1
Conference paper Open

Strategies for typecase optimization

  • 1. EPITA

Description

We contrast two approaches to optimizing the Common Lisp typecase
macro expansion. The first approach is based on heuristics intended
to estimate run time performance of certain type checks involving
Common Lisp type specifiers.  The technique may, depending on code size,
exhaustively search the space of permutations of the type checks,
intent on finding the optimal order.  With the second technique, we
represent a typecase form as a type specifier,
encapsulating the side-effecting non-Boolean parts so as to appear
compatible with the Common Lisp type algebra operators.  The encapsulated
expressions are specially handled so that the \cl type algebra
functions preserve them, and we can unwrap them after a process of Boolean
reduction into efficient \cl code, maintaining the appropriate side
effects but eliminating unnecessary type checks.  Both approaches allow us
to identify unreachable code, test for exhaustiveness of the
clauses and eliminate type checks which are calculated to be redundant.

 

Files

newton.18.els.pdf

Files (621.8 kB)

Name Size Download all
md5:8e5216f2e124b5a6f84dd02ea6123c67
621.8 kB Preview Download