September 18
On Friday, 18 September 2020 at 12:11:58 UTC, 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@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

hunt looks promising but https://github.com/huntlabs/hunt-http/issues/20 = not so good
September 18
On Wednesday, 16 September 2020 at 19:14:57 UTC, Jacob Carlborg wrote:
> On 2020-09-13 22:58, ryuukk_ wrote:
>
>> [...]
>
> 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 :( .

I also experienced it, i am rewritting most of my server services and so far i get huge gain in performance, this allowed me to downgrade the server and save money!

I plan to rewrite more, but i need better HTTP story..
September 18
On Friday, 18 September 2020 at 14:32:36 UTC, ryuukk_ wrote:
> On Wednesday, 16 September 2020 at 19:14:57 UTC, Jacob Carlborg wrote:
>> [...]
>
> I also experienced it, i am rewritting most of my server services and so far i get huge gain in performance, this allowed me to downgrade the server and save money!
>
> I plan to rewrite more, but i need better HTTP story..

* networking in general, not just HTTP
September 18
On Friday, 18 September 2020 at 14:32:36 UTC, ryuukk_ wrote:
>
> I also experienced it, i am rewritting most of my server services and so far i get huge gain in performance, this allowed me to downgrade the server and save money!
>
> I plan to rewrite more, but i need better HTTP story..

Just to be more specific, you are rewriting from Ruby to Go or was it D?
September 18
On Friday, 18 September 2020 at 14:50:15 UTC, IGotD- wrote:
> On Friday, 18 September 2020 at 14:32:36 UTC, ryuukk_ wrote:
>>
>> I also experienced it, i am rewritting most of my server services and so far i get huge gain in performance, this allowed me to downgrade the server and save money!
>>
>> I plan to rewrite more, but i need better HTTP story..
>
> Just to be more specific, you are rewriting from Ruby to Go or was it D?

java and some python to D
September 18
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@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
September 19
On Friday, 18 September 2020 at 14:31:20 UTC, ryuukk_ wrote:
> On Friday, 18 September 2020 at 12:11:58 UTC, 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@puremagic.com> wrote:
>>>>
>>>>> [...]
>>> 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
>
> hunt looks promising but https://github.com/huntlabs/hunt-http/issues/20 = not so good

Hmm, I'll try take a look later
September 20
On Saturday, 19 September 2020 at 17:15:03 UTC, Imperatorn wrote:
> On Friday, 18 September 2020 at 14:31:20 UTC, ryuukk_ wrote:
>> On Friday, 18 September 2020 at 12:11:58 UTC, 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@puremagic.com> wrote:
>>>>>
>>>>>> [...]
>>>> 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
>>
>> hunt looks promising but https://github.com/huntlabs/hunt-http/issues/20 = not so good
>
> Hmm, I'll try take a look later

As a longterm vibe-d user I'm interested in this comparison too and this comes out of this: https://github.com/tchaloupka/httpbench

Hopefully it'd be useful - PR's are welcome.
Next ›   Last »
1 2 3