News for hackers. Stuff that matters.
Re:Garnet – A new remote cache-store from Microsoft Research by thayne on Tuesday March 19, 2024 @01:56AM (#39753301)
There are at least two reasons I can think of why a JIT language with GC can outperform C/c++:

1. Memory management with a GC often has higher throughput. With the downside that you can have high latency when a garbage collection occurs.

2. The JIT compilation can potentially do a better job of optimizing, because it has information about how the code has been run so far.

It is possible for c or c++ (or rust) to get get the first using alternative memory management strategies, and the second by hand optimizing, and/or using profile guided optimization.

Re:Garnet – A new remote cache-store from Microsoft Research by pjmlp on Tuesday March 19, 2024 @05:12AM (#39754012)
3. The runtime also supports C++, and one emits the same MSIL code sequence that the C++ compiler would generate.

Which is why WASM isn't that great novelty for grey beards.

Re:Garnet – A new remote cache-store from Microsoft Research by monocasa on Tuesday March 19, 2024 @01:39PM (#39758304)
I've also seen GC reliant concurrent algorithms that would require a lot more synchronization to keep track of when to actually free an object. GCed languages can just forget about the object and rely on the GC later to figure out what threads have access to valid objects. C and C++ need to figure out if it's safe to free.