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

James Blachly james.blachly at gmail.com
Sat Sep 19 00:35:33 UTC 2020


On 9/18/20 8:11 AM, Imperatorn wrote:
> On Sunday, 13 September 2020 at 21:16:52 UTC, ryuukk_ wrote:
>> On Sunday, 13 September 2020 at 21:09:55 UTC, Daniel Kozak wrote:
>>> On Sun, Sep 13, 2020 at 11:00 PM ryuukk_ via Digitalmars-d < 
>>> digitalmars-d at puremagic.com> wrote:
>>>
>>>>
>>>> Concerning vibe.d, i'm worried about the dependencies it pulls, also 
>>>> the benchmark:
>>>>
>>>> https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=fortune&l=zijoc7-1r 
>>>>
>>>>
>>>> GO vs D, it performs quite poorly
>> I think the plain text one is the most important one to fix first, 
>> such basic concept shouldn't be that slow
> 
> Did you take a look at hunt?
> 
> https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=plaintext&l=zijoc7-1r 
> 

The plaintext benchmark looks fast, but note that the router is simply 
matching on the exact length of the path name used in the benchmark:

```
     override void onComplete(HttpRequest req) {
         string path = req.uri;
         if(path.length == plaintextLength) { // plaintext
             respondWith("Hello, World!", 200, textHeader);
         } else if(path.length == jsonLength) { // json
             JSONValue js = JSONValue(["message" : JSONValue("Hello, 
World!")]);
             respondWith(js.toJSON(), 200, jsonHeader);
         } else {
```

https://github.com/TechEmpower/FrameworkBenchmarks/blob/00fd915d843ce734f44a1af5385b4e321003bfee/frameworks/D/hunt/http/http/DemoProcessor.d#L43-L50


More information about the Digitalmars-d mailing list