Skip to content

Conversation

@HaikAsatryan
Copy link
Contributor

Hello 👋,

I’m a Senior .NET Engineer and recently watched your “.NET vs Go benchmark” video (about a year old). I found it very interesting and decided to explore this repository. I really like the way you structure your benchmarks, and since I wanted to see even more accurate results, I’ve contributed some improvements.

What I changed

  • Upgraded to the latest .NET SDK and container images for both JIT and AOT builds.
  • Aligned JIT and AOT implementations so they now share the same code style and logic (previously the AOT version was written more cleanly).
  • Micro-optimizations across both projects — small changes that in total can noticeably impact throughput and latency.
    • I intentionally stopped short of “over-optimizing” (the type of tweaks Microsoft sometimes does internally). Instead, I wrote the code in the style of a senior engineer writing production-ready services.
  • Disabled logging entirely for benchmarks, since console logging distorts performance numbers. In real projects, teams usually replace this with async sinks (e.g., Serilog with async file export). For benchmarking, I’ve left it completely disabled.
  • Preserved original contracts and behavior — I tried not to break any of your existing code or interfaces. That said, I didn’t test end-to-end with an actual S3 bucket, so if there are minor issues, they should be simple to fix.

Notes

  • Personally, I find JIT benchmarks more meaningful since AOT adoption in production is still low and comes with trade-offs. I polished the JIT code first, then used ChatGPT to replicate the same improvements to the AOT version for consistency.
  • I think it would be awesome to see future videos not only C# vs Go, but also C# vs Java or even C# vs Go vs Java — as in real-world backend scenarios, Java is the main rival to .NET.

Thanks again for your great content — I’m looking forward to new benchmark videos! 🚀

Best regards,
Haik

Copy link
Owner

@antonputra antonputra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HaikAsatryan, thanks for the PR! It's time to refresh that benchmark, and your contribution is appreciated!

@antonputra antonputra merged commit 7556422 into antonputra:main Sep 1, 2025
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.

2 participants