Simple web server benchmark - vibe.d is slower than node.js and Go?
Vadim Lopatin
coolreader.org at gmail.com
Thu Sep 21 12:41:04 UTC 2017
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.
More information about the Digitalmars-d
mailing list