logiceditor-com/luamarca
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Luamarca: a set of silly Lua benchmarks
=======================================
The name is from Portuguese "marca de referência", "a benchmark".
See the copyright information in the file named `COPYRIGHT`.
This code is still in its embryonic phase.
More appropriate description would be added later.
WARNING: Current benchmark system code is weird. You've been warned.
Patches are welcome. ;-)
Install rock:
./make.sh
WARNING: depends on
https://github.com/lua-nucleo/lua-nucleo
https://github.com/lua-aplicado/lua-aplicado
http://w3.impa.br/~diego/software/luasocket
https://github.com/logiceditor-com/le-tools
Example:
luamarca bench/arguments.lua --iterations=2e6
luamarca bench/benchmark.lua --cases=foo
luamarca bench/benchmark.lua --interpreters='luajit2 -jv:lua5.1'
luamarca bench/benchmark.lua --output=barchart
NOTE: Always run smoke check before submitting new benchmarks:
bin/smoke.sh bench/*.lua
Benchmark file standard:
------------------------
-- Return all methods from the file's main chunk
-- Return recommended number of iterations as NUM_ITERATIONS key
(ignored in current implementation)
Example:
local bench = { }
bench.NUM_ITERATIONS = 1e6
bench.methodA = function()
-- Do something
end
bench.methodB = function()
-- Do something in another way
end
return bench
'bargraph' output mode:
-----------------------
To make bar chart from benchmark data you need a bargraph.pl tool. You can get it from here: http://www.burningcutlery.com/derek/bargraph/
$ luamarca bench/benchmark.lua --output=bargraph >barchart.data; perl bargraph.pl -png barchart.data > barchart.png
About
Collection of silly Lua benchmarks
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published