- Salla DIAGNE (sallareznov)
(You can read the full report with the results by browsing the file (report.pdf).
The goal of this project is to measure and compare energy footprints of multiple languages through programs executing the same task.
To get those metrics, the project uses PowerAPI, a middleware toolkit for building software-defined power meters. Software-defined power meters are configurable software libraries that can estimate the power consumption of software in real-time.
This algorithm, implemented in multiple languages, reads a dictionary of words in a text file (one word per line), and calculates the Levenshtein distance between all consecutive words. This computation is done in two ways : recursively, and iteratively (using dynamic programming).
Every program takes one argument, which is a file path of a dictionary containing one word per line.
- reads a file containing one word per line
- for every pair of consecutive words, calculates the Levenshtein distance recursively and iteratively.
The design of the program is the following :
The algorithm follows this flowchart :
Every implemented program requires one argument, referencing the dictionary of words (one word per line). For example, to use the program implemented in Ocaml with the dictionary file in the repository, you have to execute the following commands :
$ cd ocaml
$ make
$ ./levenshtein ../dictionary.txt
In alphabetical order, the algorithm is implemented in :
- C
- Go
- Java
- Ocaml
- Python
- Scala