News for hackers. Stuff that matters.
Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by gethly on Sunday February 01, 2026 @12:16AM (#46843826)
Go being beaten by C# in multicore is quite hard to believe. Also Zig and Odin doing so "poorly" in single core is strange.
Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by osmsucks on Sunday February 01, 2026 @03:32AM (#46844536)
The quality of the benchmark code is... not great. This seems like Zig written by someone who doesn't know Zig or asked Claude to write it for them. Hell, actually Claude might do a better job here.

In short, I wouldn't trust these results for anything concrete. If you're evaluating which language is a better fit for your problem, craft your own benchmark tailored for that problem instead.

Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by gethly on Sunday February 01, 2026 @04:06AM (#46844693)
So far, the best benchmark seems to be the https://plummerssoftwarellc.github.io/PrimeView/

Although it is very single-thread biased test.

Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by igouy on Sunday February 01, 2026 @12:17PM (#46847631)
Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by DeathArrow on Sunday February 01, 2026 @06:06AM (#46845298)
Go is beaten constantly by C# in both Benchmark Game and Techempower benchmarks.
Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by mrsmrtss on Sunday February 01, 2026 @10:44AM (#46846956)
I don't know why this is downvoted, because the statement is not wrong (https://benchmarksgame-team.pages.debian.net/benchmarksgame/...). Times have changed, modern .NET is very fast and is getting faster still (https://devblogs.microsoft.com/dotnet/performance-improvemen...).
Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by piskov on Sunday February 01, 2026 @06:50AM (#46845531)
Modern c# has many low level knobs (still in a safe way; though it also supports unsafe) for zero allocation, hardware intrinsics, devirtualization of calls at runtime, etc.: simd (vector), memory spans, stackalloc, source generators (helps with very efficient json), etc.

Most of all: C# has a very nice framework and tooling (Rider).

Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by kdps on Sunday February 01, 2026 @09:25AM (#46846426)
It's not really surprising given the implementations. The C# stdlib just exposes more low-level levers here (quick look, correct me if I'm wrong):

For one, the C# code is explicitly using SIMD (System.Numerics.Vector) to process blocks, whereas Go is doing it scalar. It also uses a read-only FrozenDictionary which is heavily optimized for fast lookups compared to a standard map. Parallel.For effectively maps to OS threads, avoiding the Go scheduler's overhead (like preemption every few ms) which is small but still unnecessary for pure number crunching. But a bigger bottleneck is probably synchronization: The Go version writes to a channel in every iteration. Even buffered, that implies internal locking/mutex contention. C# is just writing to pre-allocated memory indices on unrelated disjoint chunks, so there's no synchronization at all.

Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by freeopinion on Sunday February 01, 2026 @09:39AM (#46846504)
In other words the benchmark doesn't even use the same hardware for each run?
Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by kdps on Sunday February 01, 2026 @02:37PM (#46848694)
If you're referring to the SIMD aspect (I assume the other points don't apply here): It depends on your perspective.

You could say yes, because the C# benchmark code is utilizing vector extensions on the CPU while Go's isn't. But you could also say no: Both are running on the same hardware (CPU and RAM). C# is simply using that hardware more efficiently here because the capabilities are exposed via the standard library. There is no magic trick involved. Even cheap consumer CPUs have had vector units for decades.

Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by Quothling on Sunday February 01, 2026 @10:38AM (#46846895)
C# is great, but look at the implementations. The jvm is set up wrong, so JAVA could perform better than what is benchmarked. Hell with Python you'd probably use Celery or numpy or ctypes to do this much faster.

So overall the benchmarks are kind of useless.

Re:Data Processing Benchmark Featuring Rust, Go, Swift, Zig,... by dnautics on Monday February 02, 2026 @03:19PM (#46860867)
Zig's being compiled in "releasesafe" so lots of bounds checking going on.