niklas-heer / speed-comparison

A repo which compares the speed of different programming languages.
https://niklas-heer.github.io/speed-comparison
MIT License
475 stars 76 forks source link

Docstrings for builds #86

Open niklas-heer opened 1 year ago

niklas-heer commented 1 year ago

I think it would be great to have DocStrings per build so that meta information can be stored with the code. This would also reduce drift between documentation of what is included in this speed comparison and what the different methods and approaches are.

I could see it to look like this: (using markdown syntax within)

clj-bb:
  #"""
  # builds ontop of Clojure, but uses [Babashka](https://babashka.org/) which is a Clojure interpreter with fast startup
  #"""
  FROM babashka/babashka:alpine
  DO +PREPARE_ALPINE
  DO +ADD_FILES --src="leibniz.clj"
  DO +BENCH --name="clj-bb" --lang="Clojure (Babashka)" --version="bb --version" --cmd="bb -f leibniz.clj"

Which then would be translated to a LANGUAGES.md or something in a big list with the build job name. (or the --lang="Clojure (Babashka)" parameter :thinking: )

[...]

[...]