Benchmark Dlang vs Node vs Ruby
yazd via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri May 27 07:09:03 PDT 2016
On Friday, 27 May 2016 at 13:45:23 UTC, llaine wrote:
> Hi guys,
>
> In my journey of learning about D I tried to benchmark D with
> Vibe.d vs node with express and Ruby with Sinatra.
>
> And the results are pretty surprising.
> I have to admit that I though D was more faster than that. How
> is this even possible ?
>
> I am doing something wrong ?
>
>
> Here are the numbers with the project :
>
> https://github.com/llaine/benchmarks/blob/master/README.md
The postgres library (dpq) that you're using doesn't use the
event loop that vibe-d provides. Every call you are doing is
blocking the whole server. Of course this is going to be slow.
You can try using
http://code.dlang.org/packages/vibe-d-postgresql.
More information about the Digitalmars-d-learn
mailing list