Partially evaluating MATLAB
Partially evaluating MATLAB
In this thesis, we describe the problems associated with the creation of high performance code for mathematical computations. We discuss the advantages and disadvantages of using a high level language like MATLAB and then propose partial evaluation as a way of lessening the disadvantages at little cost. Partial Evaluation is a program transformation technique, which propagates constants and performs static computations, resulting in faster residual programs. We present our approach to partially evaluate MATLAB programs using the online methodology, whereby decisions about static or dynamic values are made at specialisation time rather than as a pre-process. We also describe an implementation called MPE (MATLAB Partial Evaluator). As well as propagating static values to produce fast residual programs, MPE uses extensive shape and type inferencing to extract static information from otherwise dynamic contexts. Partially evaluated programs frequently contained redundant code, necessitating a post-processing phase to prevent irrelevant computations at run-time and also to reduce the amount of code produced. The post-processor is able to remove much of this redundancy by a combination of dead code elimination using ud-chains and duplicate function detection, using structural equivalency. To ascertain the efficacy of our approach, we obtained empirical results for a variety of real MATLAB programs. These results showed performance increases in various programs, from the relatively simple Chebyshev approximation and Lagrange Interpolation codes (with speed-ups of up to 100%) to the several different Ordinary Differential Equations solvers (speed-ups range from 57% to 568%) to a Computational Fluid Dynamics solver, which was sped up by 92%. Since these results were produced with a minimal of manual interference, we suggest that partial evaluation is a viable automated technique for use by those actually coding scientific codes.
University of Southampton
Elphick, Daniel R
3e2854fe-9aae-40f4-9ed8-7b92b095d21a
2005
Elphick, Daniel R
3e2854fe-9aae-40f4-9ed8-7b92b095d21a
Elphick, Daniel R
(2005)
Partially evaluating MATLAB.
University of Southampton, Doctoral Thesis.
Record type:
Thesis
(Doctoral)
Abstract
In this thesis, we describe the problems associated with the creation of high performance code for mathematical computations. We discuss the advantages and disadvantages of using a high level language like MATLAB and then propose partial evaluation as a way of lessening the disadvantages at little cost. Partial Evaluation is a program transformation technique, which propagates constants and performs static computations, resulting in faster residual programs. We present our approach to partially evaluate MATLAB programs using the online methodology, whereby decisions about static or dynamic values are made at specialisation time rather than as a pre-process. We also describe an implementation called MPE (MATLAB Partial Evaluator). As well as propagating static values to produce fast residual programs, MPE uses extensive shape and type inferencing to extract static information from otherwise dynamic contexts. Partially evaluated programs frequently contained redundant code, necessitating a post-processing phase to prevent irrelevant computations at run-time and also to reduce the amount of code produced. The post-processor is able to remove much of this redundancy by a combination of dead code elimination using ud-chains and duplicate function detection, using structural equivalency. To ascertain the efficacy of our approach, we obtained empirical results for a variety of real MATLAB programs. These results showed performance increases in various programs, from the relatively simple Chebyshev approximation and Lagrange Interpolation codes (with speed-ups of up to 100%) to the several different Ordinary Differential Equations solvers (speed-ups range from 57% to 568%) to a Computational Fluid Dynamics solver, which was sped up by 92%. Since these results were produced with a minimal of manual interference, we suggest that partial evaluation is a viable automated technique for use by those actually coding scientific codes.
Text
1012890.pdf
- Version of Record
More information
Published date: 2005
Identifiers
Local EPrints ID: 465894
URI: http://eprints.soton.ac.uk/id/eprint/465894
PURE UUID: 176d7c1a-e7f1-405b-9fe4-354aac524afc
Catalogue record
Date deposited: 05 Jul 2022 03:29
Last modified: 16 Mar 2024 20:25
Export record
Contributors
Author:
Daniel R Elphick
Download statistics
Downloads from ePrints over the past year. Other digital versions may also be available to download e.g. from the publisher's website.
View more statistics