answersLogoWhite

0


Best Answer

No it is because compiled programs are scared so they run like stink.

Plus, uncompiled programs, ie. source programs, do not run at all... neither slowly nor fast.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Do compiled programs usually run faster because they are already in machine code?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Give a brief description about compiled and interpreted high level languages?

Any high level language may be either compiled or interpreted. The difference is in the execution speed. Interpreted programs must re-learn how to do each statement in the program, whereas a compiled program is already in the machine code language of the hardware and runs much faster.


Why is java virtual machine required?

That's because that's the way Java is designed. Java programs are compiled to be run on a special program that interprets it - the Java Virtual Machine. The reason it is designed this way is because it allows Java programs to run on just about any computer - despite the fact that different computers have different sets of machine instructions. It is well possible to write programs that run without requiring support of specific programs - but such programs will only run on specific computers.


When the byte codes in a class file are invalid which one of the following must detect it?

When you have bytecode, the program is already compiled; so it would be the JVM which detects that.


What is the difference between interpretation and compilation in computer programming?

Interpretive languages compile blocks of code into machine code, execute them, and then move onto the next block. The blocks may be as little as a single statement, but once each statement is executed, the machine code is lost. This means that functions must be recompiled every time they are called. Ultimately, performance suffers because every block must be interpreted before it can be executed. Moreover, the program must always be executed within the interpreter; you cannot create standalone programs. Compiled languages pre-compile the entire program to produce a standalone machine code executable. As a result, compiled programs execute many times faster than interpretive languages. C++ and Java are both compiled languages however Java programs are compiled to byte code rather than machine code. The byte code must then be interpreted by the Java virtual machine in order to execute. As a result of this interpretation, Java programs do not perform well compared to equivalent programs written in C++.


How program written in high level language changed into machine code?

The way you stated your question is rather confusing, but what I think you're asking is, "are programs written in high level languages called compiled programs?"Well, not all high level languages are compiled. Python, for example, is interpreted, instead of compiled. Many, such as C++ (although that is more medium level) are compiled. In general, one would not call a program written in a compiled language a "compiled program" until it's been compiled.

Related questions

Give a brief description about compiled and interpreted high level languages?

Any high level language may be either compiled or interpreted. The difference is in the execution speed. Interpreted programs must re-learn how to do each statement in the program, whereas a compiled program is already in the machine code language of the hardware and runs much faster.


Why is java virtual machine required?

That's because that's the way Java is designed. Java programs are compiled to be run on a special program that interprets it - the Java Virtual Machine. The reason it is designed this way is because it allows Java programs to run on just about any computer - despite the fact that different computers have different sets of machine instructions. It is well possible to write programs that run without requiring support of specific programs - but such programs will only run on specific computers.


If you run a programme on compiler and interpreter then how can you come to know which is compiler and which is interpreter?

If source code requires a runtime in order to translate the source code into machine code, executing one statement at a time, then it is interpreted. If the source code has already been converted into machine code in advance, then it is compiled. Compiled code does not require a runtime. Note that compilers do not execute programs, they simply compile them. Your development environment may well execute the machine code once it is compiled, but that is not the job of the compiler, the IDE has simply launched the executable.


Why high level language process slower than low level languages?

False. HLL-programs are compiler into low level (machine code), so they aren't slower. (Programs written in interpreted languages are indeed slower than compiled programs.)


Why is java known as platform-neutral language?

Because it will work on all platforms because it's code is compiled through it's on Virtual Machine, the JVM (Java Virtual Machine).


When the byte codes in a class file are invalid which one of the following must detect it?

When you have bytecode, the program is already compiled; so it would be the JVM which detects that.


What is common language specification in .net?

.NET languages are not compiled to machine code.They are compiled to an intermediate language (IL).


Where is a program temporally stored for execution?

All programs must be loaded into memory (e.g., RAM) in order to be executed. Compiled programs can be loaded directly since they consist of native machine instructions, but interpreted programs must be translated by a runtime program. E.g., Java is an interpreted language which compiles to byte code which must be interpreted by the Java Virtual Machine implementation at runtime.


What kinds of differences are compiling and running Java vs C programs?

Although Java is often described as a compiled language, it is a language that is both compiled and interpreted. Unlike C++ which typically compiles to native machine code, Java compiles to Java byte code, the native language of the Java virtual machine. The key difference here is that the Java virtual machine is not machine dependent, thus the same byte code can be executed upon any physical machine with a suitable Java virtual machine implementation; it is highly portable. Machine code can only be executed upon the machine architecture for which it was compiled. To support other architectures, the source code must be recompiled for those architectures. In terms of execution, native machine code requires no further translation and can be executed as soon as the code is compiled successfully (including any and all shared libraries required by the executable). Java byte code requires that the Java virtual machine be memory-resident during execution as the byte code must be interpreted to produce native machine code while the byte code is executing within the virtual machine. In terms of memory consumption, C++ programs require no additional memory over and above the program's requirements. Java programs require additional memory for the Java virtual machine runtime. Java programs also consume additional memory to assist in memory management, such as automatic garbage collection. C++ programs manage their own memory using resource handles and smart pointers; the use of a garbage collector is optional. In terms of performance, C++ programs execute many times more quickly than equivalent Java programs due to Java's need to interpret the byte code.


What is the difference between interpretation and compilation in computer programming?

Interpretive languages compile blocks of code into machine code, execute them, and then move onto the next block. The blocks may be as little as a single statement, but once each statement is executed, the machine code is lost. This means that functions must be recompiled every time they are called. Ultimately, performance suffers because every block must be interpreted before it can be executed. Moreover, the program must always be executed within the interpreter; you cannot create standalone programs. Compiled languages pre-compile the entire program to produce a standalone machine code executable. As a result, compiled programs execute many times faster than interpretive languages. C++ and Java are both compiled languages however Java programs are compiled to byte code rather than machine code. The byte code must then be interpreted by the Java virtual machine in order to execute. As a result of this interpretation, Java programs do not perform well compared to equivalent programs written in C++.


Advantages of c plus plus over java?

The main advantage is that C++ programs compile to native machine code and therefore execute many times faster than equivalent Java programs, which compile to byte code suitable for interpretation by the Java virtual machine. C++ is also more efficient since it requires no interpretation (and therefore no interpreter), and can use memory just as efficiently as assembler. The main disadvantage is the code must be compiled separately for each platform. With Java, programs need only be compiled once for any platform.


How program written in high level language changed into machine code?

The way you stated your question is rather confusing, but what I think you're asking is, "are programs written in high level languages called compiled programs?"Well, not all high level languages are compiled. Python, for example, is interpreted, instead of compiled. Many, such as C++ (although that is more medium level) are compiled. In general, one would not call a program written in a compiled language a "compiled program" until it's been compiled.