If a task takes 10 hours on a 1GHz processor, does it take 5 hours on a 2Ghz processor?

As pointed out by the other answers, even if the CPU works 5 times faster, not everything will be 5 times faster, because sometimes the computer spends time not working with the CPU, but waiting for other operations, such as disk or network I/O.

In addition to that, modern CPUs are fairly complex internally, and do all kinds of fancy tricks (pipelining, branch prediction, out-of-order execution) to speed things up. This may work better or not on a faster CPU, so even for CPU-bound tasks the speedup will probably not be 5 times.

It might be less, or even more, depending on the nature of the task and how well it aligns with the optimizations the CPU tries to use. Also, these optimizations themselves will probably be different in a new CPU model (even if it is from the same series).


No, that is only the best1 possible case. If your task requires e.g. network or hard drive access, that will be a bottleneck you cannot compensate with a faster CPU.

1) assuming no other changes where made on the system and CPU


No. All time needed by an application to run does not only depend on the processor speed.
For example:

  • Disks input and outputs depend on the rotational speed of the disk platters
  • Memory reads, writes can be slower or faster depending on the cache
  • Process scheduling might be different.

If you make, say, a program which calculates prime numbers and absolutely no I/O access or network access is done, the speed is still not double. It can be very different.

If it is a CPU of the same make, generation, technology, transistor count, instruction sets and the same size of parts in nanometers a double frequency can mean double speed. That means if you don't save anything and there is no bottleneck on CPU cache.