Simple web server benchmark - vibe.d is slower than node.js and Go?

Daniel Kozak kozzi11 at gmail.com
Thu Sep 21 12:59:27 UTC 2017


my results:

OS       lang:config   req/s    comments
=======  ==========    =======  ==========
Linux    go                24K
Linux    D:libevent    27K        4 threads
Linux    D:libasync   26.5K     4 threads

On Thu, Sep 21, 2017 at 2:41 PM, Vadim Lopatin via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On Thursday, 21 September 2017 at 10:21:17 UTC, Sönke Ludwig wrote:
>
>>      shared static this()
>>>      {
>>>          (...)
>>>      }
>>>
>>
>> BTW, I'd recommend using
>>
>>     void main()
>>     {
>>         (...)
>>         runApplication();
>>     }
>>
>> instead and dropping the VibeDefaultMain version in the package recipe.
>> The old approach is planned to be faded out slowly, because it requires
>> some special DUB support that would be nice to see gone at some point.
>>
>
> Thank you!
> Trying to use multithreaded mode.
>
> Under windows, best Vibe.d results are equal to results of Go server.
> Under linux, Vibe.d is still slower even if there are 4 threads listening.
>
> Results:
>
> OS       lang:config   req/s    comments
> =======  ==========    =======  ==========
> Linux    go            53K
> Linux    D:default     48K      1 thread
> Linux    D:libevent    48K      1 thread
> Linux    D:libasync    46.5K    4 threads
>
> Windows  go            12K
> Windows  D:default     12K      4 threads
> Windows  D:libevent    12K      4 threads
> Windows  D:libasync    7K       4 threads
>
> Under Linux in default and libevent configurations, I see error messages
> from 3 of 4 threads - looks like only one thread can process connections.
>
> Failed to listen on 0.0.0.0:3000
> Task terminated with uncaught exception: Failed to listen for incoming
> HTTP connections on any of the supplied interfaces.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20170921/90ddf343/attachment.html>


More information about the Digitalmars-d mailing list