Skip to content

AstolfoBrew/SimpleBench

Repository files navigation

Simple ┬─┬ Bench

Tests

A Simple Lua VM Benchmarking Library

Notice

Scores may vary depending on the device.
Please make sure to, when comparing scores, have all scores ran on the same device.

SimpleBench does not adjust depending on the current hardware it's being ran on.

Compatability

SimpleBench is compatible with Lua 5.1 and upwards.
It should be compatible with LuaJIT, but thats not included in the tests.
SimpleBench is compatible with Luau, and therefor almost any Roblox executor.

SimpleBench is not compatible with Lua 5.0 or below

Pre-calculated scores

There are pre-calculated scores for Luau, Lua 5.1, Lua 5.2 and Lua 5.3.

Setting Up

Regular Lua Envs

In a regular lua environment, simply follow these steps:

  1. Get a Lua Enironment
  2. Download SimpleBench (Stable (Recommended), or Dev Build)
  3. Run SimpleBench in Lua (ie lua SimpleBench.lua)
  4. Look for the Final Benchmark Score at the end of the output

Roblox Studio

Soon:tm:

Roblox Executors

  1. Run this in your executor of choice:
local Settings = {
  ['RBXWaitAfterRun'] = false; -- If roblox never unfreezes, or it crashes, change false here to true.
  ['Branch'] = 'Release'; --      Change to `main` if you want to use the latest development version. Please note that it's score may be different between commits.
  ['Iterations'] = 50; --         If your results vary a lot, increase this. If, with RBXWaitAfterRun, it takes way too long, you can lower this number, however this will make the result less accurate.
};
loadstring(game:HttpGetAsync('https://raw.githubusercontent.com/AstolfoBrew/SimpleBench/main/RBXExecutorLoader.lua'))();
  1. Roblox will freeze for a bit. This is normal.

If your executor does support writefile():

  1. Open workspace/SimpleBench.log (using Notepad, VS Code, or anything else that can open text files)
  2. At the top, you should see
Final Score:
<Some Score>
  1. <Some Score> is the final score.

If your executor does not support writefile() however (ie it doesn't have a workspace folder, or its a SS exec), or for some reason the above didn't work:

  1. Press F9
  2. At the bottom, you should see Final Benchmark Score <Some Score> (Averaged across <Some Number> iterations)
  3. The final score is <Some Score>