In the age of microservices and networking in general, were D is at?

Jacob Carlborg doob at
Wed Sep 16 19:14:57 UTC 2020

On 2020-09-13 22:58, ryuukk_ wrote:

> Concerning vibe.d, i'm worried about the dependencies it pulls, also the 
> benchmark: 

I did some benchmark on some real world code at my previous work. We 
compared the performance (number of requests per second) of an HTTP 
endpoint. It fetched some data from a PostgreSQL database, did some 
processing and returned the result as JSON.

We compared a highly optimized version implemented in Ruby, this was the 
baseline. Then a colleague implemented a version in Go and I did an 
implementation in D, using vibe.d .

The end result was that the Go version ran at 0.5x of the Ruby version 
and the D version ran at 5x of the Ruby version. This was without trying 
to optimize the code afterwards. Only some common sense while writing 
the code, like if you can do it at compile time, do that. I'm pretty 
sure I didn't even used LDC for an optimized build.

Of course, everyone at the company was only talking about how on earth 
the Go version could be slower than the Ruby version. Someone later did 
some improvements so that the Go version was up to the same speed as 
Ruby. Nobody talked about how much faster the D version was, except me :( .

/Jacob Carlborg

More information about the Digitalmars-d mailing list