GithubHelp home page GithubHelp logo

go-lua-benchmark's Introduction

go-lua-benchmark

Comparing the performance of LuaJIT embedded in Go.

Handlers

Check main.go for details.

NotCachedHandler

This HTTP handler will perform a standard luaL_dofile (file read operation) on every request, this is the slowest handler!

CachedHandler

This handler will make use of luaL_dostring and the cached script data contained in cached_script. cached_script is set by LuaCacheScript.

GoHandler

The fastest handler ever!

Results

Using boom with the following parameters:

-n 5000 (number of requests)

-c 50 (number of concurrent requests)

On a Macbook Pro Mid 2014, Intel Core i7, 16 GB RAM.

NotCachedHandler

Summary:
  Total:	0.2011 secs
  Slowest:	0.0234 secs
  Fastest:	0.0002 secs
  Average:	0.0019 secs
  Requests/sec:	24861.0858
  Total data:	75000 bytes
  Size/request:	15 bytes

Status code distribution:
  [200]	5000 responses

Response time histogram:
  0.000 [1]	|
  0.003 [4476]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.005 [481]	|∎∎∎∎
  0.007 [21]	|
  0.009 [11]	|
  0.012 [0]	|
  0.014 [1]	|
  0.016 [4]	|
  0.019 [2]	|
  0.021 [2]	|
  0.023 [1]	|

Latency distribution:
  10% in 0.0010 secs
  25% in 0.0017 secs
  50% in 0.0019 secs
  75% in 0.0021 secs
  90% in 0.0025 secs
  95% in 0.0030 secs
  99% in 0.0046 secs

CachedHandler

Summary:
  Total:	0.1778 secs
  Slowest:	0.0275 secs
  Fastest:	0.0001 secs
  Average:	0.0017 secs
  Requests/sec:	28123.5876
  Total data:	75000 bytes
  Size/request:	15 bytes

Status code distribution:
  [200]	5000 responses

Response time histogram:
  0.000 [1]	|
  0.003 [4551]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.006 [365]	|∎∎∎
  0.008 [46]	|
  0.011 [8]	|
  0.014 [13]	|
  0.017 [10]	|
  0.019 [4]	|
  0.022 [1]	|
  0.025 [0]	|
  0.027 [1]	|

Latency distribution:
  10% in 0.0005 secs
  25% in 0.0009 secs
  50% in 0.0014 secs
  75% in 0.0021 secs
  90% in 0.0028 secs
  95% in 0.0036 secs
  99% in 0.0072 secs

GoHandler

Summary:
  Total:	0.0802 secs
  Slowest:	0.0034 secs
  Fastest:	0.0001 secs
  Average:	0.0008 secs
  Requests/sec:	62368.6244
  Total data:	70000 bytes
  Size/request:	14 bytes

Status code distribution:
  [200]	5000 responses

Response time histogram:
  0.000 [1]	|
  0.000 [592]	|∎∎∎∎∎∎∎∎
  0.001 [2685]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.001 [1004]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.001 [352]	|∎∎∎∎∎
  0.002 [186]	|∎∎
  0.002 [102]	|∎
  0.002 [43]	|
  0.003 [19]	|
  0.003 [11]	|
  0.003 [5]	|

Latency distribution:
  10% in 0.0004 secs
  25% in 0.0005 secs
  50% in 0.0007 secs
  75% in 0.0009 secs
  90% in 0.0013 secs
  95% in 0.0016 secs
  99% in 0.0023 secs

go-lua-benchmark's People

Contributors

matiasinsaurralde avatar

Stargazers

rikioy avatar Serge Simard avatar Mehrdad Arshad Rad avatar Abhi Agarwal avatar

Watchers

James Cloos avatar  avatar

go-lua-benchmark's Issues

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.