Low-Level Haskell Code: Measurements and Optimization Techniques

dc.contributor.advisorCooper, Keith D.en_US
dc.contributor.committeeMemberSarkar, Viveken_US
dc.contributor.committeeMemberYin, Wotaoen_US
dc.creatorPeixotto, Daviden_US
dc.date.accessioned2012-09-06T03:59:50Zen_US
dc.date.accessioned2012-09-06T03:59:54Zen_US
dc.date.available2012-09-06T03:59:50Zen_US
dc.date.available2012-09-06T03:59:54Zen_US
dc.date.created2012-05en_US
dc.date.issued2012-09-05en_US
dc.date.submittedMay 2012en_US
dc.date.updated2012-09-06T03:59:55Zen_US
dc.description.abstractHaskell is a lazy functional language with a strong static type system and excellent support for parallel programming. The language features of Haskell make it easier to write correct and maintainable programs, but execution speed often suffers from the high levels of abstraction. While much past research focuses on high-level optimizations that take advantage of the functional properties of Haskell, relatively little attention has been paid to the optimization opportunities in the low-level imperative code generated during translation to machine code. One problem with current low-level optimizations is that their effectiveness is limited by the obscured control flow caused by Haskell's high-level abstractions. My thesis is that trace-based optimization techniques can be used to improve the effectiveness of low-level optimizations for Haskell programs. I claim three unique contributions in this work. The first contribution is to expose some properties of low-level Haskell codes by looking at the mix of operations performed by the selected benchmark codes and comparing them to the low-level codes coming from traditional programming languages. The low-level measurements reveal that the control flow is obscured by indirect jumps caused by the implementation of lazy evaluation, higher-order functions, and the separately managed stacks used by Haskell programs. My second contribution is a study on the effectiveness of a dynamic binary trace-based optimizer running on Haskell programs. My results show that while viable program traces frequently occur in Haskell programs the overhead associated with maintaing the traces in a dynamic optimization system outweigh the benefits we get from running the traces. To reduce the runtime overheads, I explore a way to find traces in a separate profiling step. My final contribution is to build and evaluate a static trace-based optimizer for Haskell programs. The static optimizer uses profiling data to find traces in a Haskell program and then restructures the code around the traces to increase the scope available to the low-level optimizer. My results show that we can successfully build traces in Haskell programs, and the optimized code yields a speedup over existing low-level optimizers of up to 86% with an average speedup of 5% across 32 benchmarks.en_US
dc.format.mimetypeapplication/pdfen_US
dc.identifier.citationPeixotto, David. "Low-Level Haskell Code: Measurements and Optimization Techniques." (2012) Diss., Rice University. <a href="https://hdl.handle.net/1911/64648">https://hdl.handle.net/1911/64648</a>.en_US
dc.identifier.slug123456789/ETD-2012-05-104en_US
dc.identifier.urihttps://hdl.handle.net/1911/64648en_US
dc.language.isoengen_US
dc.rightsCopyright is held by the author, unless otherwise indicated. Permission to reuse, publish, or reproduce the work beyond the bounds of fair use or other exemptions to copyright law must be obtained from the copyright holder.en_US
dc.subjectTrace based optimizationen_US
dc.subjectProfile guided optimizationen_US
dc.subjectFeedback directed optimizationen_US
dc.titleLow-Level Haskell Code: Measurements and Optimization Techniquesen_US
dc.typeThesisen_US
dc.type.materialTexten_US
thesis.degree.departmentComputer Scienceen_US
thesis.degree.disciplineEngineeringen_US
thesis.degree.grantorRice Universityen_US
thesis.degree.levelDoctoralen_US
thesis.degree.nameDoctor of Philosophyen_US
Files
Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
PEIXOTTO-THESIS.pdf
Size:
3.45 MB
Format:
Adobe Portable Document Format
License bundle
Now showing 1 - 1 of 1
No Thumbnail Available
Name:
license.txt
Size:
1.61 KB
Format:
Item-specific license agreed upon to submission
Description: