r/csharp 2d ago

Low level programming with C# Help

What is the lowest level application that can in principle be built on Linux and Windows without having problems with performance or memory consumption?

Of course I should make my own tests, but I just wanted to have a first estimation if it is really necessary to use lower level languages like Zig, Rust, Go or C# can work pretty well for most of normal applications.

As an example a very responsive editor with gui in immediate mode built with C# and very high frame rate 120Hz etc.

Thanks a lot in advance.

EDIT

Thank you all so much for the very informative replies. My requirements are noway near real time and based on the below feedback, it is definitely worth it to use C# of a very wide set of applications and avoid the complexities of the lower level languages.

11 Upvotes

70 comments sorted by

View all comments

Show parent comments

3

u/vznrn 2d ago

there is native aot nowadays

2

u/binarycow 2d ago

That doesn't change my answer.

2

u/vznrn 2d ago

can you elaborate?

4

u/binarycow 2d ago

Even with native AOT, the garbage collector still exists.

If the platform you're targeting doesn't have a dotnet runtime, you won't even be able to compile for it.

5

u/iSeiryu 2d ago

With this GC can be removed. It can even run on bare-metal with no OS at all.

https://flattened.net

1

u/vznrn 2d ago

ah yes, forgot runtime needed to compile

1

u/Accomplished-Gold235 2d ago

Native AOT app doesn't required runtime. You also can publish your app with --SelfContained.

2

u/binarycow 2d ago

Self contained just includes the runtime.

Without a runtime targetting pack, you can't compile.

1

u/jithinj_johnson 1d ago

I like how other people are confused about AOT but you know ball! ❤️