answersLogoWhite

0


Best Answer

The main reason is that in compiled languages, the compiler reads the code and turns it into object code before you run the program. Interpreted languages have to do this step while they are running. So the time to run a Perl program corresponds to the time it would take to compile, link, and run a C program, not to the time just to run it.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the reason that script languages like ruby and PERL run slower than compiled languages?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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 2 files in java program?

There are programming languages in which the source file is read and interpreted directly, but those are usually slower than when the program is compiled, to an EXE, or as in Java, for a virtual machine.


Dis advantage of High-level programming language?

A program written and compiled with a high-level programming languages is slower, and takes up more space, than one created with a low-level programming language.However, the benefits usually far outweigh these disadvantages. It is much more work to write a decent program in a low-level language.A program written and compiled with a high-level programming languages is slower, and takes up more space, than one created with a low-level programming language.However, the benefits usually far outweigh these disadvantages. It is much more work to write a decent program in a low-level language.A program written and compiled with a high-level programming languages is slower, and takes up more space, than one created with a low-level programming language.However, the benefits usually far outweigh these disadvantages. It is much more work to write a decent program in a low-level language.A program written and compiled with a high-level programming languages is slower, and takes up more space, than one created with a low-level programming language.However, the benefits usually far outweigh these disadvantages. It is much more work to write a decent program in a low-level language.


Will shell scripts run more quickly than compiled programs?

No, scripts are slower than compiled program, and shell scripts are especially slow, for they keep running external commands.


What style of music does the script play?

Kind of like a slower pop that can work into a more upbeat pop


Write shorts note on interpreter?

An interpreter is a program that directly executes instructions written in a high-level programming language without the need for compiling them into machine code. It translates code line by line and executes it immediately, making it slower than compiled languages like C++. Interpreted languages are generally more flexible and easier to debug, as changes can be seen immediately without the need to recompile the entire program.


Disadvantages of high level languages?

I takes a big knowledge about that compiler. The programmer should be well educated person to do with this language.


What is the reason of the change of speed of planes?

So they go faster or slower.


What are disadvantages of Matlab?

Matlab is an interpreted language. The main disadvantage of interpreted languages is execution speed. When a language is compiled, all of the code is analyzed and processed efficiently, before the programmer distributes the application. With an interpreted language, the computer running the program has to analyze and interpret the code (through the interpreter) before it can be executed (each and every time), resulting in slower processing performance.


Why are high-level programming languages known as compiled languages?

They aren't. High-level languages can either be compiled, interpreted or both. Conversely, low-level languages are assembled. A compiled language is one that requires a compiler program. The compiler may produce machine code, assembly code or byte code. Machine code can be executed directly without the aid of any additional runtime software -- it is the native language of the machine. Assembly code must be assembled to produce machine code. Languages that compile to assembly code give the programmer the opportunity to optimise the low-level code prior to assembly. Byte code, on the other hand, is code that must be interpreted by an interpreter. An interpreted language is one where the source code cannot run by itself and must be interpreted by a runtime program, the interpreter. That is, the machine code is produced at runtime by the interpreter and must be re-interpreted every time the program is run. This results in much slower performance and greater memory consumption compared to the machine code programs produced by a compiler or assembler. However, the source code can be executed immediately without waiting for the entire program to be compiled, which can be time consuming with large programs. C and C++ are both compiled languages that produce machine code. Java, on the other hand, is both compiled and interpreted because it compiles to byte code which is suitable for interpretation by the Java virtual machine. Java's main advantage is that the byte code will operate upon any platform that provides a Java virtual machine implementation (which is pretty much every device these days), without the need to recompile. Conversely, both C and C++ must be recompiled for each target platform. The advantage of these languages is the programs perform better and with less memory consumption than their Java counterparts. More importantly, since they do not require a runtime program to operate, they can be used to write operating systems, drivers and embedded software as well as applications, whereas Java is limited to applications software only.


Is driving slower better?

Within reason, driving slower is better because you have more time to react. However, it is not better to drive a great deal slower than the traffic around you, because the others will be passing you at higher speed or backing up behind you.


Why do older people heal more slowly?

One reason is that the cells of the body rejuvenate at a slower pace.