Mono has improved its just-in-time and static compilers with new ways of running code.

In 2001, the Mono project officially began, the Mono development team for. NET instruction set writes an interpreter for booting a self-managed on Linux. NET development environment.

The interpreter was thought to be a temporary tool that could be used while building a just-in-time (JIT) compiler. The interpreter (Mint) and the JIT engine (MONO) remain in a state of simultaneous existence until the JIT engine can be ported to all supported platforms.

When generics were introduced, the engineering cost of keeping both the interpreter and the JIT engine became too high to be worthwhile, so the interpreter was removed.

Full static compilation of.NET code will be covered later. This also introduces techniques that prohibit the target platform from generating dynamic code. IOS was the main driver of this, opening the door to allowing Mono to run on consoles like PlayStation and Xbox.

The main drawback of full static compilation is that you have to create a completely new executable every time you update your code. This is a slow process that does not lend itself to the interactive development of practice.

For example, some game developers like to tweak their game code without triggering a full recompile. Static compilation made this impractical, so they built scripting languages into the game code to iterate and tweak quickly.

.NET’s lack of dynamic functionality also hampers. NET is used in some environments as a teaching or prototyping tool. Some tools, like Xamarin Workbooks or simple scripts, cannot be used. NET language, had to resort to other solutions on the platform.

Frank Krueger needed such an environment on iOS when building a Continuous IDE, so he wrote his own using F#. NET interpreter to give him a full.NET development environment on the iPad.

To address these issues and support some internal Microsoft products, the Mono interpreter was brought back.

 

New Mono interpreter

Now the old Mono interpreter is welcomed back again and its pair is updated. NET support, along with support for generics, has been upgraded to run. NET, which now officially exists in 2017. Next Mono will add support for mixed mode execution.

Mono now running on WebAssembly is one way of doing this (the other is using static compilation of LLVM).

The interpreter is now an important part of Mono, passing most of the extensive test suite, and you can now use it when building Mono from source code, as shown below:

$ mono --interpreter yourassembly.exeCopy the code

 

Mixed mode execution

Although stand-alone interpreters are now quite mature, the Mono development team is currently working on a configuration that can mix interpreted code with statically compiled or just-in-time compiled code, called mixed-mode execution.

For platforms like iOS, PlayStation and Xbox, mixed-mode execution means you can precompile core libraries or core applications and still support dynamic loading and execution of code. You still have the flexibility to run some dynamic code while having the advantage of optimizing all core libraries using LLVM.

This will allow game developers to use it on their systems. NET language for prototyping, experimenting, and tweaking game code without having to recompile the application.

This will open the door to the design of scriptable applications on devices that use the.NET language.

 

Future jobs

The Mono development team is expanding the interpreter’s capabilities to handle all sorts of interesting scenarios. Here are some of the current projects:

  • Improved static compilation of Mono

The full AOT-compiled version of Mono does not have system.reflection.Emit, which has several uses.

The system.linq.Expressions API is already widely used in many advanced scenarios, such as entity frameworks or users using the C# compiler to parse Expressions into expression trees. You may have seen code in the following scenarios:

Expression sum = a + b;
var adder = sum.Compile ( );
adder ( );Copy the code

In a full AOT scenario, both the design entity framework and the way it works would be integrated into the interpreter through the Expression class above. Although this Expression interpreter has limitations, it is a large interpreter.

By enabling the System.reflection.Emit interpreter, you can remove a lot of code.

This also enables scripting languages built for.NET to work in statically compiled environments such as IronPython, IronRuby and IronScheme.

To do this, the Mono development team is completing work on the hybrid mode implementation. This means that the interpreted code complements existing statically compiled.NET code.

  • Better isolation

The Mono development team is completing support for AppDomain in order to enable this solution, having previously failed to solve the problem of hot loading when developers deploy their applications.

  • Working on mixed mode options

The Mono development team found that some programs run faster when interpreted by an interpreter than when executed using a JIT engine.

So we’re going to look at mixed execution, or layered compilation. You can have the interpreter execute performance-insensitive code, such as static constructors or other initialization code that can only be run once, to reduce memory usage, generated code usage, and execution time.

The alternative is to run the code in explain mode and switch to a JIT-compiled implementation of the method if a certain threshold is exceeded, or to use properties to annotate problems encountered and methods that are not worth optimizing.

Mono: www.mono-project.com/download/

Original link: http://www.mono-project.com/

Reproduced please indicate from: Grape city control

 

Related reading:

More than 100 sets of report templates are free to download

Why do you need to migrate your code to ASP.NET Core 2.0?

What optimizations are causing.NET Core performance to soar?

 



This article is published by grape city control technology development team, reprint please indicate source: Grape city control

For more development tools and tips, please go to the official website of grape City controls

To learn about enterprise reporting and Web applications, visit the Grape City Enterprise Software website