Lightweight Modular Staging (LMS) is a Scala library for multi-stage generative programming. It allows for writing high-level, generic programs that generate specialized and fast low-level code.
One particularly interesting use case is staging functions for which some arguments are fixed; this allows for an optimized function to be generated. In this project, we investigate the performance of several such optimized staged functions.
-
Download and install the Java Development Kit (JDK).
-
Install the sbt build tool.
-
Run the
sbt run
command to run the project.
main.scala
is the file which is being run when you run this project. Within this file, you can see the methodmain()
, which contains serval.run()
-calls. Each call triggers an experiment of one of the three implemented algorithms.- Each algorithm is implemented in a different file:
- Binary Search:
BinarySearch.scala
- Binary Tree Lookup:
treesearch.scala
- Rabin-Karp:
RabinKarp.scala
- Binary Search:
For more information on the implementation of an algorithm, see its corresponding file.