]> Nishi Git Mirror - gwion.git/commitdiff
:book: Update docs [skip ci]
authorfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 5 Jul 2019 00:36:07 +0000 (02:36 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 5 Jul 2019 00:36:22 +0000 (02:36 +0200)
docs/09_Benchmarks.mdr
docs/Benchmarks.mdr [deleted file]
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 0f81e9415df378c208487a96d5adbaea61bd2c57..92ad35c88bab3e327dc7dd3b0196e8be39c27a1b 100644 (file)
@@ -83,4 +83,4 @@ plot dat_name using 0:2:($2*($3/100.0)):xtic(2) with boxerrorbar lc "blue" notit
 
 ## Show the results
 Then just run it
-@exec bash benchmark.sh; #rm bench.plot benchmark.sh
+@exec bash benchmark.sh; rm bench.plot benchmark.sh
diff --git a/docs/Benchmarks.mdr b/docs/Benchmarks.mdr
deleted file mode 100644 (file)
index 0f81e94..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-# Benchmarks
-
-We'll need a bash script
-
-<link rel=styleSheet href="../assets/doc.css" TYPE="text/css"><div id="org-categories"><ul class="lev1"><li><a href="#">Show the code</a></li><ul class="lev2"><a href="#">
-@``` benchmark.sh
-#!/bin/sh
-language=("gwion" "wren" "lua")
-extension=("gw" "wren" "lua")
-test_dir="tests/benchmark"
-plot_script="bench.plot"
-: "${repeats:=10}"
-
-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/'
-}
-
-get_list() {
-  for file in $test_dir/*.gw
-  do basename "$file" .gw
-  done
-}
-
-get_test() {
-  for (( i=0; i<=$(( ${#language[@]} -1 )); i++ ))
-  do echo "${language[$i]} $(run "${language[$i]}" "${extension[$i]}" "$1")"
-  done > "docs/assets/benchmark/$1.dat"
-}
-
-plot() {
-  gnuplot -e "bench='$1'" "$plot_script"
-}
-
-for bench in $(get_list)
-do
-echo $bench
-  get_test "$bench"
-  plot "$bench"
-  echo "### $bench"
-  echo '<link rel=styleSheet href="../assets/doc.css" TYPE="text/css"><div id="org-categories"><ul class="lev1"><li><a href="#">Show the code</a></li><ul class="lev2"><a href="#">'
-  echo "\`\`\`"
-  cat "$test_dir/$bench.gw"
-  echo "\`\`\`"
-  echo '</a></a></li></ul></ul></div>'
-  echo "![](assets/benchmark/$bench.png)"
-done
-@```  
-</a></a></li></ul></ul></div>
-
-### and a gnuplot script
-
-<link rel=styleSheet href="../assets/doc.css" TYPE="text/css"><div id="org-categories"><ul class="lev1"><li><a href="#">Show the code</a></li><ul class="lev2"><a href="#">
-@``` bench.plot
-set terminal png truecolor
-
-#if (!exists("bench"))
-#  bench = 'bench'
-if (!exists("test_dir"))
-  test_dir = 'tests/benchmark'
-
-dat_name = sprintf("docs/assets/benchmark/%s.dat", bench)
-
-stats dat_name using 0:2 noout
-max = STATS_max_y+(0.1*STATS_max_y)
-
-set title bench
-set output sprintf("docs/assets/benchmark/%s.png", bench)
-set xrange [-0.5:((ceil(STATS_max_x))+0.5)]
-set yrange [0:max]
-set boxwidth 0.50
-set nokey
-set xtics nomirror
-set ytics nomirror
-
-set style fill transparent solid 0.25 # partial transparency
-set style fill noborder # no separate top/bottom lines
-
-plot dat_name using 0:2:($2*($3/100.0)):xtic(2) with boxerrorbar lc "blue" notitle, \
-  '' using 0:(max-(0.05*max)):1 with labels
-@```  
-</a></a></li></ul></ul></div>
-
-## Show the results
-Then just run it
-@exec bash benchmark.sh; #rm bench.plot benchmark.sh
index e88f80a106e95cf0c73497cb4d8f0b1b07798924..ce3d7278c283fe602b8ddc2a38aafb6e54b45158 100644 (file)
@@ -1,3 +1,3 @@
-gwion 0.187146 0.38
-wren 0.233171 0.14
-lua 0.31488 0.72
+gwion 0.18500 0.63
+wren 0.228810 0.24
+lua 0.31364 1.10
index cc8d6afe7158f3f50513dcfaee63c278623059d6..bafec9353609a3403260f15a9319c182cef8305c 100644 (file)
Binary files a/docs/assets/benchmark/binary-trees.png and b/docs/assets/benchmark/binary-trees.png differ
index 98da6400a1761f48b13dfc6dd19fbad3cef49f53..7ea4095668ad5764cab818b37133c5bdc9347c3f 100644 (file)
@@ -1,3 +1,3 @@
-gwion 5.3189 0.35
-wren 13.6491 0.34
-lua 7.3582 0.58
+gwion 5.2990 0.37
+wren 13.4991 0.34
+lua 7.3146 0.29
index cf675fc5e7bc45d363413e22d7fa142c947ff257..d3d56bec6ad3fed6cf4fada996cbdc7011429905 100644 (file)
Binary files a/docs/assets/benchmark/fib-recurs.png and b/docs/assets/benchmark/fib-recurs.png differ
index d0fa45fd121a3478d14f924c6a2b7f7e308515f3..693519bd0ddf29afffd751e8de52e2cd050cb5cb 100644 (file)
@@ -1,3 +1,3 @@
-gwion 0.085745 0.58
-wren 0.216044 0.35
-lua 0.21337 0.60
+gwion 0.085201 0.50
+wren 0.210157 0.14
+lua 0.207941 0.43
index 99d6e11b686d67a57965edad5b47550c9f39780c..63a8cd6a6b229809615326c9a433fb43cec8b024 100644 (file)
Binary files a/docs/assets/benchmark/fib.png and b/docs/assets/benchmark/fib.png differ
index 2daf68cf6aad09b04a1d90f163e5f0a8448e716f..22636cce373980c901299aba03f5744a9d9ff20a 100644 (file)
@@ -1,3 +1,3 @@
-gwion 0.091691 0.31
-wren 0.10818 0.99
-lua 0.25820 1.48
+gwion 0.091161 0.26
+wren 0.107611 0.38
+lua 0.25866 1.21
index 65076f521b5c110b467b360d10db931f7633fe62..ed8d5acc4deeb07b0bc27fc6c0d5320ac2fd4731 100644 (file)
Binary files a/docs/assets/benchmark/method-call.png and b/docs/assets/benchmark/method-call.png differ