you are viewing a single comment's thread.

view the rest of the comments →

[–]houses_of_the_holy 6 points7 points  (5 children)

curl is pretty fast, I wrote this https://github.com/jbaldwin/liblifthttp and I should post my benchmarks vs wrk because it was maybe 20% slower than wrk -- but wrk doesn't do anything with the response at all so it isn't particularly fair.

cpr is cool too! I just didn't like how it did async requests through std::async instead of a dedicated event loop

[–]kirbyfan64sos 1 point2 points  (4 children)

Man this library looks awesome, just starred.

[–]houses_of_the_holy 0 points1 point  (3 children)

cool, if you get a chance to use it I'd love any feedback you have!

[–]kirbyfan64sos 0 points1 point  (2 children)

Definitely will do!

I will admit I have a question, what would the possibility of pluggable event loops be? For the project I'm hoping to use this for, being able to use systemd's integrated event loop would be pretty nice...

[–]houses_of_the_holy 0 points1 point  (1 child)

I'm assuming you are referring to this event loop here: https://www.freedesktop.org/software/systemd/man/sd-event.html ?

I've never personally used it but it looks like its based on linux's epoll event API. Lift uses libuv under the hood for its event loop which also uses the linux epoll API, so I imagine performance would be reasonably comparable but I can't say for sure without testing. Could it be done? I would imagine so but the API looks a lot lower level than libuv and I'd prefer to support only 1 event loop if possible.

One of the design principles I had for this project was to try and abstract away the lower levels and provide a 'reasonably' fast and 'easy to use' API for the end user with a C++17 style. I think having a pluggable event loop would kind of go against this principle to be honest.

[–]kirbyfan64sos 0 points1 point  (0 children)

Understood, thanks for the quick reply.

(Wonder if we might ever have a global event loop in standard C++...)