Processor Pipeline

Processor Pipeline

Hi!

I have a doubt.
if I have this code:

b/=5;
a+=10;
b*=5;
a*=30;

How the processor will execute this code?

The add is more fast than the division, then the second command will finish before of the first. The processor will execute the fourth command or it will wait until that the second command was finished? It will execute of the program order or in another order?

Thanks

[]'s

Rhapsodyv

3 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Dear Customer,
I am not clear if this question is related to Intel IPP forum, could you please give us some more details so we can better understand about this and try to find a right resource to answer your questions.

Thanks,
Ying
Intel IPP Support

You know, the modern processors are able to execute instructions out of order, but theyoutputtheresult of instructions in order they are written in the programm. So, if there is no data dependency between adjacent instructions they will be executed in parallel, but if any dependency, of course the next instruction will wait for the result from previous one.

Regards,
Vladimir

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!