GithubHelp home page GithubHelp logo

lua-benchmark's Introduction

lua-benchmark

Some Lua benchmark functions

These tests are executed in torch environment and LuaJIT 2.1.0-beta1 on OSX x64.

Just run

th benchmark.lua

Benchmarks

tds.Hash VS Df_Dict

Number of iterations : 1000 Data loaded :

local tabl = {["col1"]=1,["col2"]=2,["col3"]=3,["col4"]=4,["col5"]=5,["col6"]=6,["col7"]=7}

Results :

Df_Dict init took an average of 3.084659576416e-06
Hash init took an average of 4.1344165802002e-06
-----------------------------------
Df_Dict access key took an average of 2.4223327636719e-07
Hash access key took an average of 3.0994415283203e-07

pairs(table) VS ipairs(table) VS #table

Number of iterations : 1000 Data loaded :

local tabl = {1,2,3,4,5,6,7}

Results :

pairs(table) access took an average of 2.3531913757324e-07
ipairs(table) access took an average of 2.1266937255859e-07
#table access took an average of 2.0670890808105e-07

lua-benchmark's People

Contributors

alexmili avatar

Watchers

 avatar  avatar

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.