top | item 39243444

(no title)

TideAd | 2 years ago

I find this very strange, Microsoft has a lot of big internal high-performance services written in C#.

You have to be intentional about some things - largely making sure objects are very short-lived or very long-lived, to avoid long GX pauses. But .NET performs much better than it did 10-15 years ago and I can't think of a fundamental reason why you'd rewrite in Rust.

discuss

order

zozbot234|2 years ago

The Rust folks are working on experimental codegen for the CLR https://fractalfir.github.io/generated_html/rustc_codegen_cl... leveraging the existing CIL/CLR support for "unsafe" languages. Once that work is complete, you should be able to rewrite C# code to Rust on a very fine-grained basis (a single function at a time or thereabouts), just like you can when porting C to Rust. Of course, you'll also be able to remove the CIL/CLR dependency altogether if you're left with 100% Rust code, and compile to a binary just like in ordinary C/C++.

dtx1|2 years ago

Might not be all about performance but about security aswell.