performance - Assembly Language & Compiled Languages -


Both machines are translated into code, so how can the assembly be faster than compulsed languages? Am I really talking about compiled languages ​​which are translated into machine code? No C # or Java that has been compiled for an intermediate language and then the original code is compiled by a software interpreter. In

, I have learned something which I am not sure is related to it in any way. Is it because translation from a high level language generates additional machine codes? Or what's wrong in my understanding?

An utility program called an enbliller is used to translate assembly language into machine code of the target computer. The assembler makes more or less uniform translation (one mapping from one) into machine instructions and data with memorable statements. This is in contrast to high-level languages, in which a single statement is usually done in many machine instructions .

Good, this is a little related to your question, in fact the issue is that Compilers often produce incompetent machine codes for various reasons, such that it is not fully capable of analyzing your code, check the automatic category, auto-check for items, null , e.t.c.

On the other hand, if you handwrite the codec code and know what you are doing, you might write some things more efficiently than the compiler Although the behavior of the compiler may be tweaked and you can usually tell it not to check the range for example.

Most people will not write better ambambular codes than compilers, just because the compiler is written by those who know a good deal really strange but really good optimization about loop anaroling Things like that are usually a pain to write yourself and consequently make the code faster in many cases.

Although it is generally true that all the things that a computer is executing is machine code, which is very different in code, how many abstract levels do you put between the machine and the programmer, which is a level for assembly There are a few more for Java ...

Apart from this, many people believe that some customizations on the upper optimization layer pay less than the minimum. This is not necessarily the case and the compiler may have trouble understanding what you are trying to do and have failed to adapt it properly.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -