4 ms·
I'm willing to try it, I'm just waiting for a few more benchmarks regarding memory usage. Last time I checked I could only find the Benchmark Game [1] for AoT m
by etra0 3y ago
I'm willing to try it, I'm just waiting for a few more benchmarks regarding memory usage. Last time I checked I could only find the Benchmark Game [1] for AoT measurements, but they're from .NET 7.
Memory usage is important to me and golang is very good at that being light, but I really hate writing it for various personal reasons.
If I had more free-time I'd just simply go with Rust but you know, free time is limited :P.
[1] https://programming-language-benchmarks.vercel.app/csharp-vs-go https://programming-language-benchmarks.vercel.app/csharp-vs...
- neonsunset 3y agoBenchmarksGame is actually an interesting if unfortunate case for C#. Many tests there are at odds with the areas of optimizations that get most engineering effort investment in .NET: high level and/or application logic and high-performance primitives like Span, Vector, etc. (with the exception of perhaps Regex-Redux, but even there I'm not sure why the results are so low, because C# has one of the fastest[0] regex engines that only loses to Intel Hyperscan, Rust one and PCRE2). Probably the best way to go about this is to just give it a try with a sample project and see if the RAM usage is to your liking - you can get far with plain 'dotnet new console --aot' and standard library (once you're done, .NET's variant of go/cargo build is 'dotnet publish -o {output folder}'). Overall, .NET tends to have higher memory footprint than Go because its GC is designed to sustain much higher allocation rate and heaps spiking to much higher use without severely throttling performance (which Go does). But there are interesting developments with the new GC mode called DATAS. I made a very simple example project some time ago to showcase .NET's concurrency and publishing experience to someone else which shows that it now rivals Go where it's the strongest[1]. [0] https://github.com/BurntSushi/rebar#summary-of-search-time-benchmarks https://github.com/BurntSushi/rebar#summary-of-search-time-b... [1] https://github.com/neon-sunset/http-bench https://github.com/neon-sunset/http-bench
- igouy 3y agofwiw https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/regexredux.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- burntsushi 3y agoNote that I also imported regex-redux into rebar: https://github.com/BurntSushi/rebar/tree/master/record/all/2023-10-11#regex-redux https://github.com/BurntSushi/rebar/tree/master/record/all/2... It isn't exactly equivalent to the benchmark game's version. The biggest difference is that it doesn't permit parallelism. For more details on the benchmark model: https://github.com/BurntSushi/rebar/blob/master/MODELS.md#regex-redux https://github.com/BurntSushi/rebar/blob/master/MODELS.md#re... .NET does well overall in rebar's benchmarks, but less so in regex-redux (in both the benchmark game and in rebar's version of it). Not sure why. I haven't investigated. Of course, this is assuming you aren't using .NET's default interpreter engine. You've got to switch to the no-backtracking or compiled modes to get decent perf.
- igouy 3y ago[1] That isn't the benchmarks game. This is the benchmarks game: https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...