Computer technology keeps advancing at an amazing pace. Today's home computers have more memory, run faster and are relatively less expensive than computers from ten or even five years ago. Is there a way to measure how fast your computer is? You might think that you could tell simply from the processor clock frequency, but this doesn't tell the whole story. The clock frequency just tells how many operations per second the CPU can perform. In modern multi-tasking operating systems, the CPU's time is split between many programs running at once. Also, the central processor (CPU) sends data to and receives data from other subsystems on the computer (e.g., memory, disk drives, video display) which usually run at slower speeds. Modern processors are equipped with high-speed data buffers (called caches) to alleviate these bottlenecks. There are also many strategies for optimizing the order of operations in a program for greatest efficiency.
In this project you will use a Java applet (see Experimental Procedure, below) to measure how long it takes for the computer to perform arithmetic operations (addition, subtraction, multiplication and division) with various data types (integers, long integers, floating point numbers and double-precision floating point numbers).
Measuring how long an operation takes provides useful information, both for optimizing algorithm performance, and also as a "benchmark" comparison between two computers. However, you must keep in mind that with today's multi-tasking operating systems, measuring the execution time of any single process is difficult. The operating system splits CPU time between all of the programs that are running. No program has "exclusive" access to the CPU. Generally, CPU processing speed is fast enough so that you don't notice this because programs appear to be instantly responsive. Behind the scenes though, each program is getting a slice of CPU time, then waiting for its next turn before it can run again.
So it is important to remember that, due to multi-tasking, the processing times you measure with the applet below will not represent the actual CPU time required to perform an addition or subtraction. In order for the applet to give you a best estimate, keep the number of open applications to a minimum, and make sure that any open applications are not performing tasks that require lots of CPU time (e.g., printing files or downloading content from the Internet).
computer science tutorial
computer science engineering
power of computer