Showing posts with label clojure. Show all posts
Showing posts with label clojure. Show all posts

2018-06-12

Costajob HTTP Benchmark

Learning about Pony, a new (at least for me) programming language that designed to be elixir-python-golang like (imho), got me to this page:


It's interesting to see the memory usage of those language-framework, also Crystal, despite inability to utilize multicore still could perform as good as Golang's default muxer (which is not the best).

2016-11-30

Websocket Benchmark

Once again, today I found another benchmark, about websocket:

Round #1

Language Clients RAM (MB) RAM / Client (KB) LOC Library
C++ 33,000 600 18.62 140 https://github.com/zaphoyd/websocketpp
Clojure  27,000 1,500 56.89 50 http://www.http-kit.org/
Elixir 24,000 1,900 81.07 20 http://www.phoenixframework.org/
Go 24,000 800 34.13 100 Built-in golang.org/x/net/websocket
NodeJS 13,000 300 23.63 31 https://github.com/websockets/ws
JRuby 1,100 650 605.09 20 http://rubyonrails.org/
Ruby 500 150 307.20 20 http://rubyonrails.org/

Round #2

Language Version Thread Clients Clients (without Payload)
Javascript / Node / uws 6.6.0
26,000
Haskell - no chan 1.2
25,000 37,000
C++ / uWebSockets / RapidJSON 5.4.0 1 24,000 35,000
Go / Websocket 1.7
22,000 39,000
C++ / Crow / RapidJSON 5.4.0 1 20,000
Go / Gorilla 1.7
20,000
Java / Netty 1.8.0_101
20,000
Rust - ws 1.11.0
20,000
Elixir / Plug 1.3.2
19,000
Java / Undertow 1.8.0_101
19,000
NodeJS / Faye - clustered 6.6.0
19,000
Rust - scopedpool-ws 1.11.0
19,000
Clojure / Java 1.8.0_101
18,000
C++ / WebsocketPP / jsoncpp 5.4.0 8 17,000
JRuby / Eventmachine 9.1.2.0
17,000
Rust - threadpool-ws 1.11.0
17,000
Elixir / Phoenix 1.3.2
15,000
C++ / Crow / RapidJSON 5.4.0 8 14,000 42,000
Javascript / Node / ws 6.6.0
14,000
Javascript / Node / ws - clustered 6.6.0
14,000
C++ / WebsocketPP / jsoncpp 5.4.0 1 13,000
Haskell 1.2
13,000
NodeJS / Faye 6.6.0
13,000
Ruby / Eventmachine 2.3.1p112
13,000
Javascript / Node / uws - clustered 6.6.0
12,000
JRuby / Rails 9.1.2.0
1,000
Ruby / Rails 2.3.1p112
500

You can see the raw result here.


2016-11-16

Techempower Framework Benchmark Round 13

After long wait, the latest Techempower Framework Benchmark 13 is out! And just like previous one, Go's fasthttp really really fast. As usual the most important thing is data updates benchmark:


Top ranker in this part (more than 1024 req/s) are GoC++JavaJavascript (NodeJS)PerlC#, ElixirDartScalaPythonClojure, and Groovy (Actually PHP are there below the last one on the picture with 1018 req/s). And for the database part would be: PostgreSQL, MongoDB, and MySQL.

2016-06-19

Flowchart to choose your programming language

Just now, I found a cool site to generate flowchart from source code (just like dot program):

(click for larger picture)

Anyway this just a joke, just like before (if programming language were religion/woman), may odds be in your favor..

Btw here's the code if you want to modify.. please use http://pastie.org if you want to do a long comment containing source code..

Choosing Programming language flowchart;
if(I really really care 
about runtime performance) {
  if(I am masochist..) {
    if(I like Mozilla..) {
      Use Rust;rust-lang.org
    } else {
      Use C++;cplusplus.com
    }
  } else if(I don't want 
  to learn something new..) {
    Use C;cprogramming.com
  } else if(I like long lines..) {
    Use Java;java.com
  } else if(I like FP?) {
    if(But I'm not masochist..) {
      Use Scala;scala-lang.org;
    } else if(I like parentheses..) {
      Use Clojure;clojure.org
    } else if(I like Microsoft) {
      Use FSharp;fsharp.org;
    } else {
      Use Haskell;haskell.org;
    }
  } else { 
    if(I like Microsoft..) {
      if(I hate C++) {
        if(My computer is ancient..) {
          Use VB6;
        } else {
          Use VB.NET;
        } 
        vbforums.com;
      } else {
        Use CSharp;csharp-station.com;
      }
    } else if(I like Facebook..) {
      Use Hack;hacklang.org;
    } else if(I like Apple..) {
      if(I'm a bit masochist..) {
        Use Objective-C;developer.apple.com;
      } else {
        Use Swift;swift-lang.org;
      }
    } else if(I like Google..) {
      if(But I also like java 
      and javascript..) {
        Use Dart;dartlang.org;
      } else { 
        Use Go;golang.org;
      }
    } else {
      // you can also use Lazarus
      // lazarus.freepascal.org
      Use Delphi;embarcadero.com;
    }
  } 
} else {
  if(I don't want to install a thing..) {
    if(I use linux, mac, or win 10) {
      Use Bash;bash-hackers.org;
    } else {
      Use Javascript;javascript.com;
    }
  } else if(I love spaghetti..) {
    if(I don't care about my future..) {
      // Most likely you will be killed by maintainer that reads your code..
      Use Perl;perl.org;
    } else {
      Use PHP;php.net;
    }
  } else if(I want to make game mods..) {
    Use Lua;lua.org;
  } else if(I like indentations..) {
    Use Python;python.org;
  } else {
    Use Ruby;ruby-lang.org;
  }
}

Aww snaps, I forgot to add Elixir, Julia, and Crystal  -_- oh well.. maybe sometime in the future.

2015-12-21

If Programming Language were Woman

A sexist joke..


PHP is your teenage sweetheart, the girl you first awkwardly fumbled around with that one summer. Just don't try and start a more serious relationship - this girl has serious issues.

Perl is PHP's older sister. She might be a bit old for you, but she was pretty popular back in the 90s. In a long-term relationship with Larry Wall, so her standards have dropped, and she's looking seriously fugly now. "I don't care what y'all say, I still love her!", he says. No-one else does.

Ruby is the cool kid of the scripting family. When you first saw her, she took your breath away with her beauty. She was fun, too. At the time she seemed a bit slow and ditzy - though she's matured a lot in the last few years.

Python is Ruby's more sensible sister. She's elegant, classy, and sophisticated. She's perhaps too perfect. Most guys are like "dude, how can you not like Python!?". Sure, you like Python. You just consider her the boring version of the edgy and romantic Ruby.

Java is a successful career woman. Some people who've worked with feel she owes her position less to ability and more to her knack for impressing the middle-management types. You might feel that she's the sensible type you should settle down with. Just prepare for years of "NO THAT DOESNT GO THERE GOD YOU ALWAYS USE THE WRONG TYPE INTERFACE AND YOU MISSED A SEMICOLON" nagging.

C++ is Java's cousin. Similar to Java in many ways, the main difference being she grew up in a more innocent time and doesn't believe in using protection. By "protection", I mean automatic memory management, of course. What did you think I meant?

C is C++'s mom. Mention her name to some old grey beard hackers and they're sure to reminisce with a twinkle in their eye.

Objective C is another member of the C family. She joined that weird church a while back, and won't date anyone outside of it.

Haskell, Clojure, Scheme and their friends are those hipster, artsy, intellectual girls you probably spent a blissful college summer with a few years ago. The first girls who really challenged you. Of course, it could never have become something more serious (you tell yourself). Though you'll always be left asking "what if?"

You might be put off C# due to her family's reputation. But they've gone legit, the last few years, they tell you. Once you're one of us, you're one of us, you hear? You need a database? Her brother MSSQL will hook you up. Need a place to stay? Heck, her daddy will even buy you your own mansion on Azure avenue. What's that, you're having second thoughts about all these overly friendly relatives? No, you can never leave. You're part of the family, now, ya hear?

Javascript - hey, wasn't that the girl you first kissed, way before even PHP came on the scene? I wonder what she's doing now. I hear her career's really taken off in the last few years. Would be cool to catch up some time, if only for old time's sake... (You catch sight of her, dressed head to toe in designer jQuery)... wow, somebody grew into a beautiful swan...e else does.

Reblogged from utest.

Let's add some more..

VB, C#'s little sister that easier to talk to, she was quite ugly back then (VB6).

Go, new kids on the block, quite mature for her age.

Delphi, the successful career woman that anyone forgotten or leave for family reasons, but deep down inside we know that we could achieve more with her.

Check the previous blogpost about if programming language were religion.