Publication:
When Do Match-compilation Heuristics Matter?

dc.contributor.authorScott, Kevin
dc.contributor.authorRamsey, Norman
dc.date.accessioned2026-01-22T19:10:15Z
dc.date.issued2000-01-01
dc.descriptionOriginal submission date: 2012-10-29T18:58:31Z
dc.description.abstractModern, statically typed, functional languages define functions by pattern matching. Although pattern matching is defined in terms of sequential checking of a value against one pattern after another, real implementations translate patterns into automata that can test a value against many patterns at once. Decision trees are popular automata. The cost of using a decision tree is related to its size and shape. The only method guaranteed to produce decision trees of minimum cost requires exponential match-compilation time, so a number of heuristics have been proposed in the literature or used in actual compilers. This paper presents an experimental evaluation of such heuristics, using the Standard ML of New Jersey compiler. The principal finding is that for most benchmark programs, all heuristics produce trees with identical sizes. For a few programs, choosing one heuristic over another may change the size of a decision tree, but seldom by more than a few percent. There are, however, machine-generated programs for which the right or wrong heuristic can make enormous differences: factors of 2-20.
dc.identifierd791sg16q
dc.identifier.citationScott, Kevin, and Norman Ramsey. "When Do Match-compilation Heuristics Matter?." University of Virginia Dept. of Computer Science Tech Report (2000).
dc.identifier.doi10.18130/V3GB4M
dc.identifier.urihttps://doi.org/10.18130/V3GB4M
dc.identifier.urihttps://libraopen.library.virginia.edu/handle/item/8018
dc.languageEnglish
dc.language.isoen
dc.publisherUniversity of Virginia, Department of Computer Science
dc.rightsAll rights reserved (no additional license for public reuse)
dc.titleWhen Do Match-compilation Heuristics Matter?
dc.typeTechnical Report
dspace.entity.typePublication
relation.isAuthorOfPublicationbcd294ba-7791-4cb3-9226-e6ddf36b4b9d
relation.isAuthorOfPublication4d97436e-bff6-4c01-9977-7e1709ff2347
relation.isAuthorOfPublication.latestForDiscoverybcd294ba-7791-4cb3-9226-e6ddf36b4b9d

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
CS-2000-13.pdf
Size:
280.41 KB
Format:
Adobe Portable Document Format

Collections