Skip to content

Classic algorithm implementations for Scala, using the LMS library to generate optimized programs.

Notifications You must be signed in to change notification settings

DStekel3/Scala-LMS

Repository files navigation

Scala-LMS

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.

How to build

  1. Download and install the Java Development Kit (JDK).

  2. Install the sbt build tool.

  3. Run the sbt run command to run the project.

Project layout

  • main.scala is the file which is being run when you run this project. Within this file, you can see the method main(), 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:
    1. Binary Search: BinarySearch.scala
    2. Binary Tree Lookup: treesearch.scala
    3. Rabin-Karp: RabinKarp.scala

For more information on the implementation of an algorithm, see its corresponding file.

About

Classic algorithm implementations for Scala, using the LMS library to generate optimized programs.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages