![]() ![]() The more frequently a particular fragment is executed, the "hotter" it gets from JVM perspective.Įssentially, not every piece of code from our bytecode is going to be compiled. These fragments play the biggest part in overall application performance. In general, every application has fragments of code that are executed with very high frequency. This name is connected to the way of compiling the code by JVM. Let’s start by answering the first question stated in the introduction part. Thanks to just-in-time compilation we still have the ability to run the application on multiple platforms, as long as they have the correct interpreter and performance overhead are far lower than for a standard interpreted code.Īfter describing the basics of compilation we can dive deeper into topics related to Java. In most cases, such compiler creates some sort of an intermitted level code - in the case of Java, it is bytecode – which is further read and translated by the specific interpreter - for Java it is JVM. ![]() It stands for just-in-time compilation and is an attempt to combine the pros of static compilation and interpretation. We may have two basic ways of translating the code, but we as humans always want to improve the things we use. You may ask – if there are only two ways does it mean that Java is an interpreted or a statically compiled language? We benefit from the ability to run on multiple platforms but lose on execution time.Īs you can see both types have their advantages and disadvantages and are dedicated to specific use cases and will probably fail if not used in the correct case. On the other hand, it will make the execution slower than in the case of statically compiled languages. Thanks to this feature, the application may run on every CPU that has the correct interpreter. InterpretationAlready existing source code will be run and turned into binary code line by line by the interpreter while the exact line is being executed. ![]() We lose the ability to run on multiple platforms for the benefit of faster execution on a dedicated platform. Of course the same binary should be able to run on CPUs with similar set of instructions but in more complex cases your binary may fail to run and may require recompiling to meet server requirements. This file will contain set of machine code instructions targeted for particular CPU architecture.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |