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

bitwise bitwise.pvt at gmail.com
Thu Sep 21 18:49:00 UTC 2017


On Thursday, 21 September 2017 at 08:01:23 UTC, Vadim Lopatin 
wrote:
> There is a simple set of simple web server apps written in 
> several languages (Go, Rust, Scala, Node-js):
>
> https://github.com/nuald/simple-web-benchmark
>
> I've sent PR to include D benchmark (vibe.d).
>
> I was hoping it could show performance at least not worse than 
> other languages.
> But it appears to be slower than Go and even Node.js
>
> Are there any tips to achieve better performance in this test?
>
> Under windows, I can get vibe.d configured to use libevent to 
> show results comparable with Go. With other configurations, it 
> works two times slower.
>
> Under linux, vibe.d shows 45K requests/seconds, and Go - 50K. 
> The only advantage of D here is CPU load - 90% vs 120% in Go.
>
> I'm using DMD. Probably, ldc could speed up it a bit.
>
> Probably, it's caused by single threaded async implementation 
> while other languages are using parallel handling of requests?

Doesn't vibe-d use Fibers?

I tried to build a simple web server with a fiber-based approach 
once - it was horribly slow.

I hope C# (and soon C++) style stackless resumable functions will 
eventually come to D.




More information about the Digitalmars-d mailing list