<!-- TODO: add benchmarks in doc and link to it -->
It aims to be simple, small,
[fast](https://fennecdjay.github.io/Gwion/#Benchmarks/),
- [extendable](https://github.com/fennecdjay/Gwion-plug) and embeddable.
+ [extendable](https://github.com/fennecdjay/Gwion-plug) and [embeddable](https://github.com/fennecdjay/Gwion/blob/master/src/main.c#L18-L31).
### simple example code (hello_world.gw):
--- /dev/null
+# Benchmarks
+
+@``` benchmark.sh
+@[[shebang]]
+@[[languages]]
+@[[options]]
+@[[functions]]
+@```
+
+@``` shebang
+#!/bin/sh
+
+@```
+
+
+@``` languages
+#those must match!
+language=("gwion" "wren" "lua")
+extension=("gw" "wren" "lua")
+
+@```
+
+@``` options
+test_dir="tests/benchmark"
+plot_script=bench.plot
+
+# runtime options
+@[[runtime]]
+@```
+
+@``` runtime
+# allow this to be set by environment
+: "${repeats:=10}"
+
+@```
+
+@``` functions
+# bunch of stuff here
+@[[run]]
+@@[[get_list]]
+@@[[get_test]]
+@@[[plot]]
+@@[[print]]
+@```
+
+@``` run
+run() {
+ perf stat -r"$repeats" "$1" "$test_dir/$3.$2" 2>&1 |
+ grep "time elapsed" |
+ sed 's/ *\([0-9]*\),\([0-9]*\) .* seconds time elapsed *( +- *\([0-9]*\),\([0-9]*\)% )/\1.\2 \3.\4/'
+}
+@```