Review these notes. As you work through them, think about and answer the questions at the bottom of each page.
Speed
Answer:
Yes. There are both translators and interpreters for most high level language. Which you use depends on how you use the high level program.
Speed
The situation with computer languages is somewhat like that with human languages:
- Translator: takes a complete document in one language and translates it into a complete document in a second language, which can then be used by a reader of the second language.
- Interpreter: acts as an intermediate between a speaker of one language and a speaker of another language. Usually an interpreter works one sentence at a time. Immediately after a sentence is spoken in the first language, the translator converts it into the second language. You and your French translator (say) could in combination be regarded as a "virtual French speaker".
Using a human interpreter as an intermediate is slower than conversing directly in a particular language. The same is true with computer language interpreters. The interpreter has to do quite a bit of work to deal with the language it is interpreting. The extra work makes it look like the virtual processor is much slower than the real one.
Question 15:
Is it always important for a program to run as fast as possible? (Hint: take some time to answer this question.)