From: fennecdjay Date: Wed, 3 Jul 2019 16:00:20 +0000 (+0200) Subject: :book: Update docs [skip ci] X-Git-Tag: nightly~2381^2~3 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1310dfce5f6f4b252c1a7ab147259cc8ad3e3077;p=gwion.git :book: Update docs [skip ci] --- diff --git a/README.md b/README.md index 480fb803..8095958f 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Gwion is a programming language, aimed at making music 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): diff --git a/docs.mk b/docs.mk index af87eff9..e4bbbe1c 100644 --- a/docs.mk +++ b/docs.mk @@ -30,6 +30,7 @@ doc-build: $(md_list) $(DOCTOOL) build doc-deploy: $(md_list) + -@$(call _docserver_config) @$(DOCTOOL) gh-deploy @$(MAKE) -s doc-clean diff --git a/docs/BenchmarkScript.mdr_skip b/docs/BenchmarkScript.mdr_skip new file mode 100644 index 00000000..8747ce9a --- /dev/null +++ b/docs/BenchmarkScript.mdr_skip @@ -0,0 +1,52 @@ +# 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/' +} +@``` diff --git a/docs/assets/benchmark/binary-trees.dat b/docs/assets/benchmark/binary-trees.dat index 2cd7956a..e88f80a1 100644 --- a/docs/assets/benchmark/binary-trees.dat +++ b/docs/assets/benchmark/binary-trees.dat @@ -1,3 +1,3 @@ -gwion 0.19202 0.54 -wren 0.239317 0.22 -lua 0.32971 1.33 +gwion 0.187146 0.38 +wren 0.233171 0.14 +lua 0.31488 0.72 diff --git a/docs/assets/benchmark/binary-trees.png b/docs/assets/benchmark/binary-trees.png index 109747f5..cc8d6afe 100644 Binary files a/docs/assets/benchmark/binary-trees.png and b/docs/assets/benchmark/binary-trees.png differ diff --git a/docs/assets/benchmark/fib-recurs.dat b/docs/assets/benchmark/fib-recurs.dat index 86f9eb6e..98da6400 100644 --- a/docs/assets/benchmark/fib-recurs.dat +++ b/docs/assets/benchmark/fib-recurs.dat @@ -1,3 +1,3 @@ -gwion 5.3284 0.22 -wren 13.7413 0.56 -lua 7.5237 0.31 +gwion 5.3189 0.35 +wren 13.6491 0.34 +lua 7.3582 0.58 diff --git a/docs/assets/benchmark/fib-recurs.png b/docs/assets/benchmark/fib-recurs.png index 5ee19f84..cf675fc5 100644 Binary files a/docs/assets/benchmark/fib-recurs.png and b/docs/assets/benchmark/fib-recurs.png differ diff --git a/docs/assets/benchmark/fib.dat b/docs/assets/benchmark/fib.dat index 3247b482..d0fa45fd 100644 --- a/docs/assets/benchmark/fib.dat +++ b/docs/assets/benchmark/fib.dat @@ -1,3 +1,3 @@ -gwion 0.086983 0.46 -wren 0.21537 0.82 -lua 0.21401 0.71 +gwion 0.085745 0.58 +wren 0.216044 0.35 +lua 0.21337 0.60 diff --git a/docs/assets/benchmark/fib.png b/docs/assets/benchmark/fib.png index 758382a0..99d6e11b 100644 Binary files a/docs/assets/benchmark/fib.png and b/docs/assets/benchmark/fib.png differ diff --git a/docs/assets/benchmark/method-call.dat b/docs/assets/benchmark/method-call.dat index a1f473c0..2daf68cf 100644 --- a/docs/assets/benchmark/method-call.dat +++ b/docs/assets/benchmark/method-call.dat @@ -1,3 +1,3 @@ -gwion 0.092774 0.34 -wren 0.110397 0.41 -lua 0.25987 1.67 +gwion 0.091691 0.31 +wren 0.10818 0.99 +lua 0.25820 1.48 diff --git a/docs/assets/benchmark/method-call.png b/docs/assets/benchmark/method-call.png index d4918073..65076f52 100644 Binary files a/docs/assets/benchmark/method-call.png and b/docs/assets/benchmark/method-call.png differ