Giter Site home page Giter Site logo

gobijan / fibonacci-web-lang-benchmark Goto Github PK

View Code? Open in Web Editor NEW
40.0 5.0 23.0 192 KB

This repository contains web-apps written in different web languages and frameworks that get a number as url parameter and calculate the corresponding fibonacci number.

Makefile 2.58% Erlang 22.66% Go 26.15% Java 5.42% JavaScript 11.94% PHP 1.92% Python 18.47% Ruby 3.33% Scala 7.53%

fibonacci-web-lang-benchmark's Introduction

Fibonacci Web Framework/Platform Shootout

This repository contains web-apps written in different languages and frameworks that get a number as url parameter and calculate the corresponding fibonacci number.

These implementations are used for benchmarking. The original story can be found here:

https://medium.com/@tschundeee/express-vs-flask-vs-go-acc0879c2122

The Task

I decided to do a little benchmark of some of my favorite web stacks. So I created a web service that calculates the corresponding fibonacci number to a request parameter.

The Code

A request to for example http://localhost:3000/10 calculates fib(10) and returns the result (55 in this case) as plain text. I think it’s better to have a little computation per each request because it is more realistic than just serving “Hello World”.

fibonacci-web-lang-benchmark's People

Contributors

acangiano avatar gobijan avatar oyiptong avatar romul avatar sakthipriyan avatar yuce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

fibonacci-web-lang-benchmark's Issues

PHP Benchmark?

Would it be possible to add PHP to the comparison? I see the code is done but its not on the comparison page.

Node Test and Sinatra Data Not Right

I run the same tests on the Macbook Air 1.3 GHZ i5 4Gig RAM and this is what i got, for NodeJS

Josephs-MacBook-Air:~ joseph$  wrk -c 64 -d 30s http://localhost:3000/10 
Running 30s test @ http://localhost:3000/10
  2 threads and 64 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    12.59ms    1.85ms  41.10ms   92.38%
    Req/Sec     2.55k   161.20     3.40k    88.17%
  152520 requests in 30.01s, 30.84MB read
Requests/sec:   5082.61
Transfer/sec:      1.03MB

And this is what i got from running Sinatra with JRuby 9.0, i had to warm up the JVM first and also changed from Thin to use Puma

Josephs-MacBook-Air:~ joseph$  wrk -c 64 -d 30s http://localhost:4567/10 
Running 30s test @ http://localhost:4567/10
  2 threads and 64 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    15.91ms   46.90ms 502.05ms   91.13%
    Req/Sec     2.55k     1.07k    4.94k    63.27%
  152185 requests in 30.03s, 25.25MB read
  Socket errors: connect 0, read 20, write 1, timeout 0
Requests/sec:   5067.90
Transfer/sec:    861.16KB

Under the JVM the performance catches up, i will even run this with TorqueBox this should even give more performance than am currently having with Puma

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.