Giter Club home page Giter Club logo

lua_benchmarking's People

Contributors

fsfod avatar ltratt avatar vext01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

fsfod zhaoshijian

lua_benchmarking's Issues

A simple way of quickly running benchmarks

I think we need to provide a simple way of people who don't have Krun to run benchmarks quickly, using whatever Lua VM they have knocking around, to encourage people to contribute to this repo. At its most basic it should just be something like:

$ lua quick_run.lua
Running bench1: .........................
  Mean: 2.2s +/- 0.1s
Running bench2: .........................
  Mean: 0.8s +/- 0.05s

What we need to do is a get a reasonable trade-off between ease of use and not being completely statistically misleading. My suggestion is that we run each benchmark for 30 in-process iterations (printing a "." to stdout as each is being run, so the user knows something is happening), and after each printing a mean and a 95% confidence interval. quick_run.lua could take an optional integer parameter which varies the number of in-process iterations (so quick_run.lua 10 would run 10 in-process iterations).

We would of course need to put a warning in the README along the lines of "this isn't statistically reliable, but it is better than nothing." I can handle that part if you want me to.

Add a mechanism for benchmarks to do any extra building necessary

Some benchmarks might need to build external libraries or do other work in order to run. We should allow benchmarks to have a build.sh script in their directory which is automatically run (the first time the benchmark is run? or when the top-level build is invoked?) to set things up. We may want to pass a specific work dir to this script so that benchmarks can avoid polluting global directories?

The number of benchmarks run should be a command line option

simplerunner.lua currently accepts a number as a final argument. This is ambiguous: we can't, for example, have a benchmark called "30". This argument should be moved to a command-line switch -n. This will also make it easier to allow multiple benchmarks to be specified on the command line.

Move non-shared modules out of the global dir

At the moment anything which a Lua benchmark wants to import ends up in lualibs. For modules which are shared between benchmarks, this is fine, but it's going to get very messy very quickly for anything which isn't shared. Let's move non-shared modules into the benchmark directories that use them, and have the benchmark update its global search path appropriately.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.