aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2015-11-26 16:39:42 -0500
committerFranklin Wei <git@fwei.tk>2015-11-26 16:39:42 -0500
commit85d8dcdf25bc0c75eb9abc14d3fd591339dc2fb5 (patch)
treedaa832761f8b90ae9960a6472d3257d3cde252e3
parentc668251e99a024a525bb07ef33a3900ef463a89a (diff)
downloadducky-85d8dcdf25bc0c75eb9abc14d3fd591339dc2fb5.zip
ducky-85d8dcdf25bc0c75eb9abc14d3fd591339dc2fb5.tar.gz
ducky-85d8dcdf25bc0c75eb9abc14d3fd591339dc2fb5.tar.bz2
ducky-85d8dcdf25bc0c75eb9abc14d3fd591339dc2fb5.tar.xz
update readme
-rw-r--r--README.md36
1 files changed, 35 insertions, 1 deletions
diff --git a/README.md b/README.md
index cfd6471..920a7d8 100644
--- a/README.md
+++ b/README.md
@@ -23,12 +23,14 @@ Simple!
LET a = 0; LET b = 0; LET iter = 0
LABEL loop_start
LOGVAR a
+ NEWLINE
LET c = a+b
LET a = b
LET b = c
INC iter
IF iter < 20; GOTO loop_start
LOG Done!
+ NEWLINE
### Prime Counter
@@ -82,6 +84,11 @@ This will create `a.out`, which contains the bytecode.
ducky a.out
+### Full Compile (from ducky to machine code)
+
+ ducky -a scriptname.ds
+ ./a.out
+
## Technical Details
The program consists of four parts: the interpreter, compiler, bytecode interpreter, and C transcompiler.
@@ -101,12 +108,39 @@ Executes the bytecode generated by the bytecode compiler.
### C Transcompiler
Translates bytecode generated by the bytecode compiler into C.
-Depends on labels as values, which is a GCC extension.
## Benchmark Results
21 Nov 2015:
+ c - clang 26 27 27 27 27 27 27 27 27 27 - AVG 26.9
+ c - gcc 29 29 29 29 29 29 29 29 29 29 - AVG 29
+ c - tcc 28 28 28 28 28 28 28 28 28 28 - AVG 28
+ ducky - clang 15 15 15 15 15 15 15 15 15 15 - AVG 15
+ ducky - gcc 28 28 28 28 28 28 28 28 28 26 - AVG 27.8
+
+26 Nov 2015:
+
+<table>
+<tr><th>Language</th><th>Compiler</th><th>Optimization Level</th><th>Scores</th><th>Mean score</th></tr>
+<tr><td>C</td><td>Clang</td><td>-O0</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>C</td><td>Clang</td><td>-O1</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>C</td><td>Clang</td><td>-O2</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>C</td><td>Clang</td><td>-O3</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>C</td><td>GCC</td><td>-O0</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>C</td><td>GCC</td><td>-O1</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>C</td><td>GCC</td><td>-O2</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>C</td><td>GCC</td><td>-O3</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>Ducky</td><td>Clang</td><td>-O0</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>Ducky</td><td>Clang</td><td>-O1</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>Ducky</td><td>Clang</td><td>-O2</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>Ducky</td><td>Clang</td><td>-O3</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>Ducky</td><td>GCC</td><td>-O0</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>Ducky</td><td>GCC</td><td>-O1</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>Ducky</td><td>GCC</td><td>-O2</td><td> SCORES </td> <td> MEAN </td></tr>
+<tr><td>Ducky</td><td>GCC</td><td>-O3</td><td> SCORES </td> <td> MEAN </td></tr>
+</table>
+
## Future Directions