How AOT compares to a traditional JIT compiler

Source: Internet
Author: User

Ahead-of-time (AOT) compilation is in contrast to Just-in-time compilation (JIT).

In a nutshell,. NET compilers does not generate platform specific assembly code, they generate. NET bytecode, instructions W Hich is interpreted by the. NET virtual machine. This bytecode was portable, any. NET VM can run it, being it Windows Phone, Mono on Linux, or a javascript-based implementatio N. Unfortunately, because the code have to being interpreted by the VM it's slower than native code which can be executed by The processor itself. That's where JIT and AOT come in.

When a. NET application starts up, the JIT compiler analyzes the bytecode, identifies areas the could is sped up by being Translated to native code, and compiles them. During execution, the compiler can also identify hot paths for compilation.

Unfortunately for. NET, Java, and any platform this would benefit from JIT, dynamic code generation was disallowed by the A PP Store Terms of service. Since Xamarin can ' t perform JIT on the device and they know they ' re shipping to ARM devices, they can run a jit-ty PE compiler ahead of time (AOT) and bundle it into the binary.

How AOT compares to a machine code compiler

As mentioned above, AOT translates part of a interpreted bytecode to machine code. It doesn ' t eliminate the need for a virtual machine bytecode interpreter. The VM would run just as it would if, but occasionally see a instruction that says "Execute this chunk of machine code".

Is this just a marketing term?

No. The message, Xamarin is conveying in, paragraph was, their code performs faster than a simple byte code based Language. For both IOS and Android, they is able to execute native code in hot code paths to improve performance. The terms AOT and JIT is technical details about what they do.

How AOT compares to a traditional JIT compiler

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.