Skip to content

Commit

Permalink
Add LuaJIT benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanos committed Oct 27, 2022
1 parent 7f836ce commit 3f7051e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ authors = ["Aleksandr Orlenko <[email protected]>"]
[features]
mlua_lua54 = ["mlua/lua54", "mlua/vendored"]
mlua_luau = ["mlua/luau"]
mlua_luajit = ["mlua/luajit", "mlua/vendored"]

[dependencies]
rand = "0.8"
Expand All @@ -33,6 +34,11 @@ name = "mlua_luau"
harness = false
required-features = ["mlua_luau"]

[[bench]]
name = "mlua_luajit"
harness = false
required-features = ["mlua_luajit"]

[[bench]]
name = "rlua"
harness = false
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The project goal is to benchmark most popular embedded scripting languages for Rust.

- [mlua](https://crates.io/crates/mlua) (Lua 5.4 and Luau)
- [mlua](https://crates.io/crates/mlua) (Lua 5.4, LuaJIT and Luau)
- [rlua](https://crates.io/crates/rlua) (Lua 5.4)
- [rhai](https://crates.io/crates/rhai)
- [rune](https://crates.io/crates/rune)
Expand All @@ -15,14 +15,14 @@ Simply run the `bench.py` script to generate images. It requires `cargo criterio

## Environment

| | |
|-------|-------------------------------|
| OS | macOS 12.6, Core i9-9880H |
| mlua | v0.8.4 |
| rlua | v0.19.4 |
| rhai | v1.10.1 |
| rune | v0.12.0 |
| rustc | v1.64.0 |
| | |
| ----- | -------------- |
| OS | macOS 12.6, M2 |
| mlua | v0.8.4 |
| rlua | v0.19.4 |
| rhai | v1.10.1 |
| rune | v0.12.0 |
| rustc | v1.64.0 |

## Results

Expand Down
Binary file modified Sort userdata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions benches/mlua_luajit.rs

0 comments on commit 3f7051e

Please sign in to comment.