Hacker News new | ask | show | jobs
by mrsmrtss 230 days ago
Actually, if you had made an opposite example, it might have gone against your point. ;) C# gives you a lot more control over memory and other low-level aspects, after all.
2 comments

That’s semantics though, not syntax. What’s holding Java performance back in some areas is its semantics.

It might be the same with x86 and power-efficiency (semantics being the issue), but there doesn’t seem to be a consensus on that.

Yet how much perf in recent dot nets comes from that, and how much comes from "Span<T>"ning whole BCL?
There’s much more to it than just Span<T>. Take a look at the performance improvements in .NET 10: https://devblogs.microsoft.com/dotnet/performance-improvemen.... When it comes to syntax, even something like structs (value types) can be a decisive factor in certain scenarios. C# is fast and with some effort, it can be very fast! Check out the benchmarks here: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
I know that C# is fast, this is my favourite lang, but it is hard to say honestly which one is faster

I love the saying "i dont trust benchmarks that i didn't fake myself"