Dev Perfects
40 subscribers
9.23K photos
1.26K videos
468 files
13K links
بخوام خیلی خلاصه بگم
این کانال میاد مطالب کانالای خفن تو حوزه تکنولوژی و برنامه نویسی رو جمع میکنه

پست پین رو بخونید
https://t.iss.one/dev_perfects/455


ارتباط:
https://t.iss.one/HidenChat_Bot?start=936082426
Download Telegram
Forwarded from Accio
Regarding to pipe-lining, they don't always result in optimization. There are times when you might run into obstacles called Pipeline Hazards.
There are three types of pipeline hazards:

Structural Hazard: When two or more instructions need the same unit of CPU
Data Hazard: An instruction needs to wait for a previous operation to be completed
Control Hazard: CPU can’t tell which instructions it needs to execute next

The third one probably got your attention. How could CPU not know which instruction to execute next? Imagine a simple If statement. When CPU reaches this type of branching, It cannot choose future instructions with 100% certainty. That's why there a set of tricks to remove branches from your program as much as possible called Branchless-Programming.

It's worth noting that compilers do a set of optimizations in regard of removing branches as well. So knowing how your compiler acts is essential to how you optimize your code.

#CPU #Pipelining #Branchless_Programming.
Forwarded from Accio
Regarding to pipe-lining, they don't always result in optimization. There are times when you might run into obstacles called Pipeline Hazards.
There are three types of pipeline hazards:

Structural Hazard: When two or more instructions need the same unit of CPU
Data Hazard: An instruction needs to wait for a previous operation to be completed
Control Hazard: CPU can’t tell which instructions it needs to execute next

The third one probably got your attention. How could CPU not know which instruction to execute next? Imagine a simple If statement. When CPU reaches this type of branching, It cannot choose future instructions with 100% certainty. That's why there a set of tricks to remove branches from your program as much as possible called Branchless-Programming.

It's worth noting that compilers do a set of optimizations in regard of removing branches as well. So knowing how your compiler acts is essential to how you optimize your code.

#CPU #Pipelining #Branchless_Programming.