Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyendumajumdar committed Jun 28, 2015
1 parent 7241763 commit 1a60f33
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 35 deletions.
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Right now (June 2015) I am working on the ``libgccjit`` based JIT implementation

The LLVM JIT compiler is mostly functional. The Lua and Ravi bytecodes currently implemented in LLVM are described in `JIT Status <http://the-ravi-programming-language.readthedocs.org/en/latest/ravi-jit-status.html>`_ page.

Performance Benchmarks
++++++++++++++++++++++
For performance benchmarks please visit the `Ravi Performance Benchmarks <http://the-ravi-programming-language.readthedocs.org/en/latest/ravi-benchmarks.html>`_ page.

Optional Static Typing
++++++++++++++++++++++
Ravi allows you to annotate local variables with static types. The supported types and the resulting behaviour are as follows:
Expand Down
2 changes: 1 addition & 1 deletion ravi-tests/mandel1.ravi
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ end
local function dummy(x)
end

ravi.dumplua(domandel)
--ravi.dumplua(domandel)
assert(ravi.compile(domandel))

t1 = os.clock()
Expand Down
35 changes: 20 additions & 15 deletions readthedocs/ravi-benchmarks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@ Ravi's reason for existence is to achieve greater performance than standard Lua

The programs used in the performance testing can be found at `Ravi Tests <https://github.com/dibyendumajumdar/ravi/tree/master/ravi-tests>`_ folder.

+---------------+---------+----------+-----------+
| Program | Lua5.3 | Ravi | Luajit 2.1|
+===============+=========+==========+===========+
|fornum_test1 | 9.187 | 0.305 | 0.309 |
+---------------+---------+----------+-----------+
|fornum_test2 | 9.57 | 0.922 | 0.906 |
+---------------+---------+----------+-----------+
|fornum_test3 | 53.932 | 4.593 | 7.778 |
+---------------+---------+----------+-----------+
|mandel(4000) | 21.247 | 2.94 | 1.633 |
+---------------+---------+----------+-----------+
|fannkuchen(11) | 63.446 | 8.875 | 4.751 |
+---------------+---------+----------+-----------+
|matmul(1000) | 34.604 | 4.2 | 0.968 |
+---------------+---------+----------+-----------+
+---------------+---------+------------+------------------------+
| Program | Lua5.3 | Ravi | Ravi | Luajit 2.1 |
| | Windows | LLVM 3.7 | libgccjit | Windows |
| | | Windows | Ubuntu VM | |
+===============+=========+============+===========+============+
|fornum_test1 | 9.187 | 0.305 | 0.000001 | 0.309 |
+---------------+---------+------------+-----------+------------+
|fornum_test2 | 9.57 | 0.922 | 0.939 | 0.906 |
+---------------+---------+------------+-----------+------------+
|fornum_test3 | 53.932 | 4.593 | | 7.778 |
+---------------+---------+------------+-----------+------------+
|mandel(4000) | 21.247 | 2.94 | 3.09 | 1.633 |
+---------------+---------+------------+-----------+------------+
|fannkuchen(11) | 63.446 | 8.875 | | 4.751 |
+---------------+---------+------------+-----------+------------+
|matmul(1000) | 34.604 | 4.2 | | 0.968 |
+---------------+---------+------------+-----------+------------+

Following points are worth bearing in mind when looking at above benchmarks.

Expand All @@ -40,6 +42,9 @@ Following points are worth bearing in mind when looking at above benchmarks.
But LuaJIT timings include the JIT compilation times, so they show
incredible performance.

5. The benchmarks were run on Windows 8.1 64-bit except for the libgccjit
benchmarks which were run on a Ubuntu 64-bit VM running on Windows 8.1.

Ideas
-----
There are a number of improvements possible. Below are some of my thoughts.
Expand Down
38 changes: 19 additions & 19 deletions readthedocs/ravi-jit-libgccjit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Setting up of the Lua types is proving easier in ``libgccjit`` due to the fact t

JIT Status of Lua/Ravi Bytecodes
---------------------------------
Following is the status as of 27 June 2015.
Following is the status as of 28 June 2015.

+-------------------------+----------+--------------------------------------------------+
| name | JITed? | description |
Expand Down Expand Up @@ -185,41 +185,41 @@ Following is the status as of 27 June 2015.
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_ADDFN | YES | R(A) := RK(B) + C |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_ADDIN | NO | R(A) := RK(B) + C |
| OP_RAVI_ADDIN | YES | R(A) := RK(B) + C |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_SUBFF | NO | R(A) := RK(B) - RK(C) |
| OP_RAVI_SUBFF | YES | R(A) := RK(B) - RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_SUBFI | NO | R(A) := RK(B) - RK(C) |
| OP_RAVI_SUBFI | YES | R(A) := RK(B) - RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_SUBIF | NO | R(A) := RK(B) - RK(C) |
| OP_RAVI_SUBIF | YES | R(A) := RK(B) - RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_SUBII | NO | R(A) := RK(B) - RK(C) |
| OP_RAVI_SUBII | YES | R(A) := RK(B) - RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_SUBFN | NO | R(A) := RK(B) - C |
| OP_RAVI_SUBFN | YES | R(A) := RK(B) - C |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_SUBNF | NO | R(A) := B - RK(C) |
| OP_RAVI_SUBNF | YES | R(A) := B - RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_SUBIN | NO | R(A) := RK(B) - C |
| OP_RAVI_SUBIN | YES | R(A) := RK(B) - C |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_SUBNI | NO | R(A) := B - RK(C) |
| OP_RAVI_SUBNI | YES | R(A) := B - RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_MULFF | NO | R(A) := RK(B) * RK(C) |
| OP_RAVI_MULFF | YES | R(A) := RK(B) * RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_MULFI | NO | R(A) := RK(B) * RK(C) |
| OP_RAVI_MULFI | YES | R(A) := RK(B) * RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_MULII | NO | R(A) := RK(B) * RK(C) |
| OP_RAVI_MULII | YES | R(A) := RK(B) * RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_MULFN | NO | R(A) := RK(B) * C |
| OP_RAVI_MULFN | YES | R(A) := RK(B) * C |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_MULIN | NO | R(A) := RK(B) * C |
| OP_RAVI_MULIN | YES | R(A) := RK(B) * C |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_DIVFF | NO | R(A) := RK(B) / RK(C) |
| OP_RAVI_DIVFF | YES | R(A) := RK(B) / RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_DIVFI | NO | R(A) := RK(B) / RK(C) |
| OP_RAVI_DIVFI | YES | R(A) := RK(B) / RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_DIVIF | NO | R(A) := RK(B) / RK(C) |
| OP_RAVI_DIVIF | YES | R(A) := RK(B) / RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_DIVII | NO | R(A) := RK(B) / RK(C) |
| OP_RAVI_DIVII | YES | R(A) := RK(B) / RK(C) |
+-------------------------+----------+--------------------------------------------------+
| OP_RAVI_TOINT | YES | R(A) := toint(R(A)) |
+-------------------------+----------+--------------------------------------------------+
Expand Down
4 changes: 4 additions & 0 deletions readthedocs/ravi-overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Right now (June 2015) I am working on the ``libgccjit`` based JIT implementation

The LLVM JIT compiler is mostly functional. The Lua and Ravi bytecodes currently implemented in LLVM are described in `JIT Status <http://the-ravi-programming-language.readthedocs.org/en/latest/ravi-jit-status.html>`_ page.

Performance Benchmarks
++++++++++++++++++++++
For performance benchmarks please visit the `Ravi Performance Benchmarks <http://the-ravi-programming-language.readthedocs.org/en/latest/ravi-benchmarks.html>`_ page.

Optional Static Typing
++++++++++++++++++++++
Ravi allows you to annotate local variables with static types. The supported types and the resulting behaviour are as follows:
Expand Down

0 comments on commit 1a60f33

Please sign in to comment.