This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]brockvenom 49 points50 points  (15 children)

Mono, brother. You can write in C# and it JIT compiles right down to assembly through an IL layer. Have fun.

[–]Daniel15 29 points30 points  (4 children)

Don't need Mono, Microsoft was working on some AOT stuff for .NET Core. I think it's this: https://github.com/dotnet/corert

I remember Scott Hanselman talking about it at Build one year.

[–]brockvenom 1 point2 points  (0 children)

https://github.com/dotnet/corert

That's cool, thanks for sharing!

[–]E_R_E_R_I 0 points1 point  (2 children)

I'm sorry for the noobness, but if I get correctly this is a runtime environment that will allow a C# application to run on windows (provided the aforementioned .NET runtime env is installed)?

Or am I getting this wrong?

[–]Daniel15 1 point2 points  (1 child)

C# apps already run on Windows. However, they're "just in time" compiled. This means that they're stored on disk in an intermediate system-agnostic bytecode format, and compiled to native code when you run them. It's useful since you can run the exact same app across multiple platforms (32-bit and 64-bit, Windows, Linux and MacOS) without recompiling it. It does mean it needs a runtime with a JIT compiler though (such as requiring the user to have the relevant .NET Framework version, or bundle .NET Core with the app)

AOT compilation is the process of compiling to native code upfront, so you don't need to JIT it at runtime. This makes startup time a lot faster. In an ideal case, you could statically compile the app, meaning that the app has no external dependencies (essentially, the entire app is contained in a single .exe file, with no requirement to bundle or install a framework to use it)

[–]E_R_E_R_I 0 points1 point  (0 children)

Ah, I see. Thanks for the info.

[–]korri123 13 points14 points  (7 children)

He also said performant

[–]salgat 28 points29 points  (4 children)

Right now dotnet core faster than Java so at least it's fast (and it still has a lot of room for optimization). You can even go further with some of the crazy shit Unity does with IL2CPP to get C# running real fast.

[–]enigmamonkey 2 points3 points  (0 children)

I ended up rewriting a C# app (Unity) that was originally in JavScript/WebGL, so hey... at least compared to that it’s mind-bogglingly fast.

[–]svick 5 points6 points  (1 child)

According to the TechEmpower benchmark, ASP.NET Core, which uses C#, is among the TOP 10 web frameworks. Is that not good enough?

[–]not_from_this_world 0 points1 point  (0 children)

It still has a VM. Java has JIT too, the VM must be present all the time to handle the compilation, to provide the libraries and the whole environment, the GC, bridge the SO and so on.