]> Nishi Git Mirror - gwion.git/commitdiff
:book: Update docs [skip ci]
authorfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 3 Jul 2019 16:00:20 +0000 (18:00 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Wed, 3 Jul 2019 16:00:27 +0000 (18:00 +0200)
README.md
docs.mk
docs/BenchmarkScript.mdr_skip [new file with mode: 0644]
docs/assets/benchmark/binary-trees.dat
docs/assets/benchmark/binary-trees.png
docs/assets/benchmark/fib-recurs.dat
docs/assets/benchmark/fib-recurs.png
docs/assets/benchmark/fib.dat
docs/assets/benchmark/fib.png
docs/assets/benchmark/method-call.dat
docs/assets/benchmark/method-call.png

index 480fb803a37789a157603ef5e8df0ee2b6f48495..8095958f117a2c5e1c5715a319eef2e875822298 100644 (file)
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Gwion is a programming language, aimed at making music
 <!-- 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):
 
diff --git a/docs.mk b/docs.mk
index af87eff9b523d39176b75fd2a778e011ab387629..e4bbbe1cb02b0511ff29f8fc93ef35b6044eca3f 100644 (file)
--- 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 (file)
index 0000000..8747ce9
--- /dev/null
@@ -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/'
+}
+@```
index 2cd7956a2e6c26f9da0e8d6d727f23787b392f37..e88f80a106e95cf0c73497cb4d8f0b1b07798924 100644 (file)
@@ -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
index 109747f5cdf036bc3d63cc0c3eebefe87c4bc73c..cc8d6afe7158f3f50513dcfaee63c278623059d6 100644 (file)
Binary files a/docs/assets/benchmark/binary-trees.png and b/docs/assets/benchmark/binary-trees.png differ
index 86f9eb6e77e54a3d0adf47bfb2f9a3d35f8105bd..98da6400a1761f48b13dfc6dd19fbad3cef49f53 100644 (file)
@@ -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
index 5ee19f84361fdc7908609103777004efd7904dea..cf675fc5e7bc45d363413e22d7fa142c947ff257 100644 (file)
Binary files a/docs/assets/benchmark/fib-recurs.png and b/docs/assets/benchmark/fib-recurs.png differ
index 3247b482cabe6d3dfe17fd7a6be6f3cedc1ccf48..d0fa45fd121a3478d14f924c6a2b7f7e308515f3 100644 (file)
@@ -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
index 758382a026b901e8fd423bfc75fabc81a2c7ffbe..99d6e11b686d67a57965edad5b47550c9f39780c 100644 (file)
Binary files a/docs/assets/benchmark/fib.png and b/docs/assets/benchmark/fib.png differ
index a1f473c0a2a0800bb7f5a2a5fb4d4ee14a62e26c..2daf68cf6aad09b04a1d90f163e5f0a8448e716f 100644 (file)
@@ -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
index d4918073927219a1dac80a9b67c48c7049730ad9..65076f521b5c110b467b360d10db931f7633fe62 100644 (file)
Binary files a/docs/assets/benchmark/method-call.png and b/docs/assets/benchmark/method-call.png differ