logoalt Hacker News

SPBSlast Monday at 11:40 AM2 repliesview on HN

> And as a consequence, C# can pack the value types directly in the generic data structure, instead of holding references to heap-allocated objects.

> This is very important both for cache locality and for minimizing garbage collector pressure.

How is C# just not straight-up faster than Java then? Instead of both language punching around the same weight on benchmarks? Doesn't cache locality like, have a huge effect on performance?


Replies

no_wizardlast Monday at 12:33 PM

There’s more to the speed of a language than this one thing.

In many aspects C# is. I remember listening to a talk from Microsoft (admittedly) where using 100% latest features was on average faster than Java

actionfromafarlast Monday at 11:46 AM

I have no answer except that Java Hotspot JIT seems to be almost too good to be true. I guess it's my way of saying I would also like to know why C# isn't just plain faster than Java.