 1 - 4 of 4 Posts

#### lolllll117

·
##### Spiritual Migration
Joined
·
1,562 Posts
Discussion Starter · ·
I'm going to try to sum up exactly how processor performance is measured in such a way that even someone with minimal knowledge on computers can understand.

I give a lot of advice to friends on buying computer parts, and a couple of times I got asked this question:
"These two processors are about the same price, but this Intel one has 4 cores and 3.5 GHz and the AMD one has 8 cores and 4.0 GHz so isn't it better?

Theoretically, yes. But there are some things that are worth mentioning.

How is processing power measured?

First things first, Processor performances is commonly measured in a unit called "FLoating point Operations Per Second" or "FLOPS". The term measures how many operations or "Calculations" your processor can carry out in a single second using this formula:

FLOPS* = Sockets x (Cores/Sockets) x Clock x (FLOPs**/Cycle)
Credit: wikipedia
*FLOPS indicating the total calculations made by all processors and cores in a single computer over 1 second of time.
**FLOPs indicating the number of Floating Point Operations carried out by a single core of a single processor over 1 cycle.

Now, I've always found this equation confusing so i'm going to try and simplify it to the best of my knowledge:

FLOPS* = Total number of cores x Clock Speed x Number of calculations carried out in a single cycle
*FLOPS indicating the total calculations made by all processors and cores in a single computer over 1 second of time.

What this means is if a single Core on a 4 core processor with a clock speed of 3.5GHz can do 4 "calculations" in a single cycle, it would look like this when plugged into the equation:

FLOPS = 4 cores x 3,500,000,000 hertz x 4 calculations per cycle
4 x 3,500,000,000 x 4 = 56,000,000,000 FLOPS

Simple enough, right?

What is Clock speed and Cycles?

Cycle: a series of events that are regularly repeated in the same order.
In a computer a cycle usually consists of the Processor retrieving instructions from a program, determining what actions the program wants it to do, and carrying out those instructions. This is most commonly adding, subtracting, and multiplying binary digits. In simple processors, only one calculation can be done on a single core at any given time. But modern processors in computers can perform around 4 processes in a single core every cycle. It used to be that since there was only one core and that core could only perform 1 process at a time, it would have to carry out every single task separately. This means that moving your mouse would take an entire process and anything else that you are doing such as watching a video or playing an audio file would have to wait for that process to be done before it could continue. Thankfully, even if single process CPU's were still used in modern computers, the speed at which each cycle is completed is so fast that it would seem as if your processor was multitasking.

Modern computers operate in the Gigahertz range. A Gigahertz being 1,000,000,000 cycles/second. Meaning that your computer pulls instructions from your memory, calculates those instructions, and sends an output over 1 Billion times every second! This is what we call Clock speed. So whenever you read on a CPU box that it operates at 4.0 GHz that means that each core does approximately 4 Billion "calculations" every second under full load assuming all cores are "Physical".

What is a core?

As i said before, processors used to only carry out a single operation every cycle. But after awhile processor developers decided it would be better to put in multiple "calculation circuits" in a single processor. That way multiple calculations can be performed every cycle. Every one of these separate but identical circuits are what we call "Cores". They Operate at the same speed and all receive their instructions from the same queue. When you do a task on your computer it sends each task to the queue where each task is sent to an open core to be calculated. Since the processor is on a clock it doesn't wait for all the cores to have a calculation so during low load some cores will have little to no calculations to make.

What is the difference between a Physical and a Virtual core?

When you look at the Specs of an Intel i7 processor, you will notice that it says "4 Cores/8 Threads". What this means is that the processor it's self has only 4 cores to carry out operations, but it tricks your operating system into thinking you have 8 cores using "Virtual Cores". Virtual cores don't have an exact definition since there are multiple ways to split work loads up to make it seem like there are more cores than what is physically on the Chip. For Intel, a virtual core is currently a single physical core with two schedulers that are pre-loading the data about to be calculated kind of similar to RAM and cache's. The CPU is the fastest operating component in any computer so it's often waiting on things like RAM to send over instructions for what it should calculate next. It takes time for data to transfer anywhere on a computer so by pre-loading the data in one queue while it performs the calculations requested in the other queue it can reduce the waiting time and significantly increase the efficiency of the processor without having to add extra cores.

Why more virtual cores isn't always better.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is all i've gathered out of two terms of studying computer engineering as well as some outside research. If i am off with any of this information or you feel like this guide is missing something, please tell me and i'll try my best to correct it

• CSCoder4ever, Fir3Chi3f, Punjab and 1 other person

·
Joined
·
2,629 Posts

#### Punjab

·
##### Registered
Joined
·
247 Posts
Very cool and thanks for sharing!

#### lolllll117

·
##### Spiritual Migration
Joined
·
1,562 Posts
Discussion Starter · ·
Quote:
From what i understand, Floating Point units in processors CAN calculate integer values, but integers are more often sent to separate Arithmetic logic units. I assume this is because many spare bits are reserved for just telling the Floating Point units where the decimal is. for example: if the processor's Floating Point Units have 256 bits of input and 56 of those are reserved for just showing where the decimal is, then it can handle calculating a binary integer that has let's say, 189 bits. it just tells the decimal bits that the decimal point is all the way to the right of the number so that it has no decimals. but if it was a decimal number with 205 bits used for example, some of the bits used to write out the entire number will overlap with the bits used for stating where the decimal point is resulting in an overflow unless it splits that calculation into two parts which would be time consuming and wasteful.

A Floating Point unit thinks of it's input like it's in scientific notation. By that i mean, it has digits reserved for the number, the base that it's going to be multiplied by (always 2?) and the exponent to multiply it by. by setting the exponent to a negative number it can output an integer similar to how in scientific notation 1.23 x10^-2 would be 123. so technically it's still a floating point operation, but the output is a whole number.

If the number is a large Floating point number with a lot of decimal values, something like 1234.567, it's possible that the processor could take "1230" and process it seperately in an ALU while the FLU processes the 4.567 (all of this in the same core) and then after that operation is complete, add them together. the output would still technically be a floating point operation even though part of the number was processed as a decimal operation.

1 - 4 of 4 Posts