Teaching Kids Programming – Estimating the Performance Speedup (Gain) using Amdahls Law


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):

tex_9151f214c35c2d5168ffa880b54e9b6d Teaching Kids Programming - Estimating the Performance Speedup (Gain) using Amdahls Law math teaching kids programming youtube video

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:

tex_e8c76c9455a8cc8e2cae8fa10d35be52 Teaching Kids Programming - Estimating the Performance Speedup (Gain) using Amdahls Law math teaching kids programming youtube video

As we have known that:

tex_9151f214c35c2d5168ffa880b54e9b6d Teaching Kids Programming - Estimating the Performance Speedup (Gain) using Amdahls Law math teaching kids programming youtube video
so tex_cbaeb93ed16b26176915d33d7ec5e6eb Teaching Kids Programming - Estimating the Performance Speedup (Gain) using Amdahls Law math teaching kids programming youtube video
so replacing B with P, tex_8ef8b8573ad4c99a06d22106c02d8a23 Teaching Kids Programming - Estimating the Performance Speedup (Gain) using Amdahls Law math teaching kids programming youtube video

With this equation, we can plot the speed up vs P – i.e. the higher P, the higher performance gain we can achieve:

amdahls-law-performance-gain-speedup Teaching Kids Programming - Estimating the Performance Speedup (Gain) using Amdahls Law math teaching kids programming youtube video

Amdahl’s Law (Performance Speedup via N Cores)

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
539 words
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

The Permanent URL is: Teaching Kids Programming – Estimating the Performance Speedup (Gain) using Amdahls Law

Leave a Reply