Tuning MetaOCaml Programs for High Performance

Tobias Langhammer · 2005

The domain of high-performance computing is still dominated by manual optimiza-tions of programs written in C or Fortran. The reason why high-level languages failed to gain ground is the execution overhead entailed by the potential abstractions intro-duced. This thesis proposes MetaOCaml for enriching the domain of high-performance computing by multi-staged programming. MetaOCaml extends the OCaml language by three new constructs in order to provide run-time code generation. By tagging OCaml code fragments with a pair of special brackets, they become abstract data ob-jects of the program enclosing them. This program can create and combine code objects at run time as well as execute them in its environment by the application of a single op-erator. This allows the easy construction of speed-optimized code. Furthermore, like OCaml, MetaOCaml is a language with static types. Though code objects are generated and executed at run time, its type system guarantees the type correctness of run-time generated code at the time the program is compiled.

Read the paper · More papers on PaperTik