Benchmark Dlang vs Node vs Ruby

llaine via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 27 08:18:38 PDT 2016


On Friday, 27 May 2016 at 15:11:32 UTC, Rene Zwanenburg wrote:
> On Friday, 27 May 2016 at 13:45:23 UTC, llaine wrote:
>> Hi guys,
>>
>> In my journey of learning about D I tried to benchmark D with 
>> Vibe.d vs node with express and Ruby with Sinatra.
>>
>> And the results are pretty surprising.
>> I have to admit that I though D was more faster than that. How 
>> is this even possible ?
>>
>> I am doing something wrong ?
>>
>>
>> Here are the numbers with the project :
>>
>> https://github.com/llaine/benchmarks/blob/master/README.md
>
> Could this line be the problem?
> https://github.com/llaine/benchmarks/blob/master/vibed/source/app.d#L30
>
> You keep appending the db result to a class member, so the 
> response size grows with every call.
>
> Additionally minimizing allocations should give a nice speed 
> boost.

As I said I'm sorry, my level in D is really low, so :
- How can I not keep appending ?
- And how can I minimize allocations?


More information about the Digitalmars-d-learn mailing list