Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite beast C++ test server #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Rewrite beast C++ test server #110

wants to merge 1 commit into from

Conversation

sehe
Copy link

@sehe sehe commented Jun 12, 2024

This rewrite was prompted by the issue opened on the beast repository: boostorg/beast#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

  • for one, the beast archive references in cpp/build.zig.zon is gone;
  • secondly the upstream zig flake does not have zig 0.12.0 ¯\(ツ)/¯ Luckily that's in Nixpkgs, so I switched to nixpkgs-unstable.
  • I also added a liburing dependency to the devShell. This was only temporary to test with uring, but it didn't produce better results

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 flake had dependency issues
 - for one, the beast archive references in cpp/build.zig.zon is gone;
 - secondly the upstream zig flake does not have zig 12.0 ¯\_(ツ)_/¯
   Luckily that's in Nixpkgs, so I switched to nixpkgs-unstable.
 - I also added a `liburing` dependency to the devShell. This was to
   test with uring, but it didn't produce better results
@sehe
Copy link
Author

sehe commented Jun 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant