zigzap / zap

blazingly fast backends in zig
MIT License
2.23k stars 75 forks source link

Rewrite beast C++ test server #110

Open sehe opened 3 months ago

sehe commented 3 months ago

This rewrite was prompted by the issue opened on the beast repository: https://github.com/boostorg/beast/issues/2883

You can see the relative timings (there are several choices) there. Suffice it to say that the fast config is 10x faster than the original.

From the commit message:

This happens to use C++20 coroutines because I'm lazy. It can equivalently be written without.

I reworded measure.sh to use cmake instead of zig build. Again, I'm lazy and don't wish to learn zig build today.

The Nix flake had dependency issues

sehe commented 3 months ago

I should probably make explicit that I post the PR to make the maintainers of this zigzap project aware of the improved C++ server. Feel free to fix the collateral damage (cmake, measure.sh, Program.cs) which solely exists for practical reasons to test for the linked Beast issue.