Teaching Kids Programming: Videos on Data Structures and Algorithms
Nowadays, CPU has multicore technologies (e.g. multithreading/hyper-threading) – which we can employ to speed up the computation tasks. Let’s define the speed up S(N) as the ratio of time to complete the task using 1 core noted as T(1) and the time to complete the task using N cores noted as T(N):
Given a task which can be 100% parallelizable, it is obvviously the maximum speed up is N by using N cores. If a task can only be done sequentially i.e. 0% parallelizable, then the speed up is one because the T(1) is equal to T(N).
Amdahls Law Simply Explained
Amdahls Law studies the maximum speed up (performance gain). If a task consists of B sequential tasks and P portion that can be parallelizable, then:
As we have known that:
so
so replacing B with P,
With this equation, we can plot the speed up vs P – i.e. the higher P, the higher performance gain we can achieve:
–EOF (The Ultimate Computing & Technology Blog) —
loading...
Last Post: Different ways of Loading Javascript Files in a Javascript File
Next Post: Teaching Kids Programming - Image Flood Fill via DFS and BFS Algorithm