English

Optimising Code Generation with haggies

High Energy Physics - Phenomenology 2014-11-20 v2 Computational Physics

Abstract

This article describes haggies, a program for the generation of optimised programs for the efficient numerical evaluation of mathematical expressions. It uses a multivariate Horner-scheme and Common Subexpression Elimination to reduce the overall number of operations. The package can serve as a back-end for virtually any general purpose computer algebra program. Built-in type inference that allows to deal with non-standard data types in strongly typed languages and a very flexible, pattern-based output specification ensure that haggies can produce code for a large variety of programming languages. We currently use haggies as part of an automated package for the calculation of one-loop scattering amplitudes in quantum field theories. The examples in this articles, however, demonstrate that its use is not restricted to the field of high energy physics.

Keywords

Cite

@article{arxiv.0907.3714,
  title  = {Optimising Code Generation with haggies},
  author = {Thomas Reiter},
  journal= {arXiv preprint arXiv:0907.3714},
  year   = {2014}
}

Comments

66 pages, 5 figures, program files for download at http://www.nikhef.nl/~thomasr/

R2 v1 2026-06-21T13:27:32.882Z