Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LuaJIT benchmark #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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