# A Search for Improved Performance in Regular Expressions

**Authors:** Brendan Cody-Kenny, Michael Fenton, Adrian Ronayne, Eoghan Considine,, Thomas McGuire, Michael O'Neill

arXiv: 1704.04119 · 2017-04-14

## TL;DR

This paper applies Genetic Programming to optimize regular expressions for better runtime performance, demonstrating consistent improvements across a benchmark suite by maintaining functionality and exploring diverse solutions.

## Contribution

First application of automated software performance improvement using Genetic Programming specifically for regular expressions, introducing a benchmark suite and diversity strategies.

## Key findings

- Genetic Programming achieves performance improvements in all tested cases.
- Starting evolution from a known good expression is effective.
- Diversity in initial populations helps escape local optima.

## Abstract

The primary aim of automated performance improvement is to reduce the running time of programs while maintaining (or improving on) functionality. In this paper, Genetic Programming is used to find performance improvements in regular expressions for an array of target programs, representing the first application of automated software improvement for run-time performance in the Regular Expression language. This particular problem is interesting as there may be many possible alternative regular expressions which perform the same task while exhibiting subtle differences in performance. A benchmark suite of candidate regular expressions is proposed for improvement. We show that the application of Genetic Programming techniques can result in performance improvements in all cases.   As we start evolution from a known good regular expression, diversity is critical in escaping the local optima of the seed expression. In order to understand diversity during evolution we compare an initial population consisting of only seed programs with a population initialised using a combination of a single seed individual with individuals generated using PI Grow and Ramped-half-and-half initialisation mechanisms.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1704.04119/full.md

## Figures

1 figure with captions in the complete paper: https://tomesphere.com/paper/1704.04119/full.md

## References

43 references — full list in the complete paper: https://tomesphere.com/paper/1704.04119/full.md

---
Source: https://tomesphere.com/paper/1704.04119