Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Dibyendu Majumdar committed Apr 5, 2015
1 parent e9616f5 commit 32fdbd8
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 109 deletions.
13 changes: 9 additions & 4 deletions readthedocs/ravi-benchmarks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ The programs used in the performance testing can be found at `Ravi Tests <https:
+-------------+---------+----------+-----------+
|mandel | 21.247 | 5.79 | 1.633 |
+-------------+---------+----------+-----------+
|fannkuchen | 63.446 | 11.044 | 4.751 |
+-------------+---------+----------+-----------+

There are a number of reasons why Ravi's performance is not as good as Luajit.

Expand All @@ -27,10 +29,9 @@ There are a number of reasons why Ravi's performance is not as good as Luajit.
ideas on what can be improved but have parked this for now as I want
to get more coverage of Lua bytecodes first.

3. Luajit obviously is significant smaller in size when LLVM is added
to the comparison. Using LLVM will tend to preclude Ravi's JIT engine
from being useful in constrained devices - although ahead of time
compilation could be used in such cases.
3. Luajit compilation approach ensures that it can use information about
the actual execution path taken by the code at runtime whereas Ravi
compiles each function as a whole regardless of how it will be used.

Ideas
-----
Expand All @@ -44,6 +45,10 @@ instructions. The obvious optimization is to eliminate this variable by making t
compatiblity it is necessary to allow updates to the external variable then a compromise would be analyse the Lua program and only create the
external variable if necessary.

The Fornum loop needs to handle four different scenarios, resulting from the type of the index variable and whether the loop increments or decrements.
The generated code is not very efficient due to branching. The common case of integer index with constant step can be specialized for greater
performance.

The Value Storage
-----------------
In Lua the type of the value and the data associated with a value are stored in separate fields. Luajit however overlays the storage by utilizing
Expand Down

0 comments on commit 32fdbd8

Please sign in to comment.