This repository is the research artifact for a Master's thesis on the energy efficiency of programming languages. It runs a fixed suite of benchmarks across many languages under a hardware-based energy-measurement tool and feeds the results into a reproducible data-analysis pipeline.
The thesis argument, interpretation, and conclusions belong to the dissertation itself. This README only describes what the repository contains and how to run it.
The project measures 18 programming languages, grouped into 3 execution compilers, on 8 core benchmarks from the Computer Language Benchmarks Game (CLBG). Energy and performance are measured by the Green Metrics Tool (GMT), and the measurements are exported, cleaned, and analysed into per-language results.
| Execution Model | Languages |
|---|---|
| AOT | C, C++, C#, Dart, Go, Haskell, Java, OCaml, Rust, Swift |
| JIT | Erlang, F#, JavaScript (Node.js), Ruby |
| Interpreted | Lua, Perl, PHP, Python |
Benchmarks: binary-trees, fannkuch-redux, fasta, k-nucleotide, mandelbrot,
n-body, regex-redux, spectral-norm.
benchmarks/<lang>/— one GMT YAML per language × benchmark.<benchmark>.ymlis the canonical run;<benchmark>_test.ymlis a fast smoke test on smaller inputs. Each YAML declares a Docker service (withsetup-commandsfor compilation) and a timedflow.inputs/— shared fasta input files mounted into the containers; generated byscripts/generate_inputs.sh(run automatically duringmake setup).scripts/—measure.sh(orchestrates GMT runs),merge_results.py(merges the per-language CSVs),setup.sh/uninstall.sh, andgenerate_inputs.sh.kwa/— Go CLI ("KWA") that reads measurements out of GMT's Postgres database and exports them to CSV. Seekwa/README.md.notebooks/— Jupyter notebooks for cleaning, energy/time analysis, and cross-language comparison (v1 plus a regeneratedv2/set).results/— CSV outputs of the pipeline (raw and cleaned).docs/— compiler flags, per-language CLBG implementation notes, and methodology.green-metrics-tool/— GMT itself, cloned locally bymake setup(not committed).
Linux only (Ubuntu 22.04 / 24.04). Bootstrap the environment, then run a measurement:
make setup # full local env (Docker, GMT, Go, Python) — see docs/setup.md
make measure lang=go # measure one language — see docs/usage.mdMeasurements flow through export → merge → clean into results/; see
docs/pipeline.md.
docs/setup.md— full setup and uninstall stepsdocs/usage.md— running benchmarks and KWA build/rundocs/pipeline.md— results pipeline and outputsdocs/flags.md— per-language compiler flags and build settingsdocs/benchmarks/— CLBG implementation notes and benchmark analysisdocs/credits.md— attribution for the CLBG source codekwa/README.md— KWA CLI documentation
[1] clbg