The Need for Speed: Testing the Execution Speed of Today's Popular Computer Languages

CSEF · 2003 Mathematics & Software

Overview

Objectives/Goals This project is designed to test the execution speed of popular computer languages such as QBASIC, Java, and C++ and determine which language will execute its code the fastest. Methods/Materials Seven different tests were written in each of the three computer languages. Each test was designed to measure execution speed of common programming tasks such as calculating variables or sorting a list. All tests used the system timer in calculating starting and ending times for each program while executing the given task for each individual test. Each test was executed on various platforms to validate my hypothesis of the fastest language. Results C++ was the fastest of the three computer languages being tested with Java as a close second with QBASIC in third. C++ and Java were able to consistently execute faster than QBASIC. On some tests, QBASIC took seconds longer than C++ and Java, which were able to complete their tasks in milliseconds. Conclusions/Discussion C++ is a computer language that compiles its source code straight into the native language of the machine. Because of this, compiled C++ programs are ready to be executed when instructed to. Java still compiles its source code, but it is first translated into generalized bytecodes which can be interpreted by any computer with the java virtual machine installed, and can then be executed. QBASIC turns out to be the slowest of the three languages because it reads each statement line by line, and then translates the statement into machine code that can be executed by the computer.

Summary statement

This project tests three different computer languages to see which one can be executed the fastest.

Help received

Father helped construct board.

Competition history

  • CSEF 2003 Mathematics & Software · Entry S1201

Resources

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Browse more like this

Source: California Science & Engineering Fair public projects

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google