Speed

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   hear noise   go to next page

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 another language, which can then be used at any time.
  • Interpreter:   acts as an intermediate between a speaker of one language and a speaker of another language. Usually works a sentence at a time. 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 14:

Is it always important for a program to run as fast as possible? (Hint: take some time to answer this question.)