Simple web server benchmark - vibe.d is slower than node.js and Go?
Regio
Regio at regio.com
Fri Sep 22 22:46:02 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?
Its a bit uneven benchmark as you are testing default Go vs
default D + Vibe.D.
One can use a more faster framework like Go's Gin
https://github.com/gin-gonic/gin
In my tests in the past with Vibe.D 0.8, Go was faster with the
alternative frameworks.
More information about the Digitalmars-d
mailing list