News for hackers. Stuff that matters.
Re:The Performance Impact of C++'s `final` Keyword by neonsunset on Tuesday April 23, 2024 @02:32AM (#40129123)
Roslyn didn't have much of changes in terms of optimizations - it compiles C# to IL so does very little of that, save for switches and certain new or otherwise features like collection literals. You are probably talking about RyuJIT, also called just JIT nowadays :D

(the distinction becomes important for targets serviced by Mono, so to outline the difference Mono is usually specified, while CoreCLR and RyuJIT may not be, it also doesn't help that JIT, that is, the IL to machine code compiler, also services NativeAOT, so it gets more annoying to be accurate in a conversation without saying the generic ".net compiler", some people refer to it as JIT/ILC)

Re:The Performance Impact of C++'s `final` Keyword by ygra on Tuesday April 23, 2024 @03:49AM (#40129570)
No, I meant that we've written a compiler, based on Roslyn, whose runtime for compiling the code has improved by 20 % when switching to .NET 6.

And indeed, on the C# -> IL side there's little that's being actually optimized. Besides collection literals there's also switch statements/expressions over strings, along with certain pattern matching constructs that get improved on that side.

Re:The Performance Impact of C++'s `final` Keyword by neonsunset on Tuesday April 23, 2024 @03:52AM (#40129585)
Interesting! (I was way off the mark, not reading carefully, ha)

Is it a public project?

Re:The Performance Impact of C++'s `final` Keyword by ygra on Tuesday April 23, 2024 @06:57AM (#40130443)
Nope, completely internal and part of how we offer essentially the same product on multiple platforms with minimal integration work. And existing C# → anything compilers are typically too focused on compiling a whole application instead of offering a library with a stable and usable API on the other end, so we had to roll our own.