https://en.wikipedia.org/wiki/Amdah's_law

Amdahl's law is often used in parallel computing to predict the theoretical speedup when using multiple processors. For example, if a program needs 20 hours using a single processor core, and a particular part of the program which takes one hour to execute cannot be parallelized, while the remaining 19 hours (p = 0.95) of execution time can be parallelized, then regardless of how many processors are devoted to a parallelized execution of this program, the minimum execution time cannot be less than that critical one hour. Hence, the theoretical speedup is limited to at most 20 times (1/(1 − p) = 20). For this reason parallel computing is relevant only for a low number of processors and very parallelizable programs.

Computer Systems A Programmer's Perspective Second Edition

Gene Amdahl, one of the early pioneers in computing, made a simple but insightful

observation about the effectiveness of improving the performance of one part

of a system. This observation has come to be known as Amdahl’s law. The main
idea is that when we speed up one part of a system, the effect on the overall sys-
tem performance depends on both how significant this part was and how much
it sped up.
 
So, for example, if we can speed up 60% of the system to the point where it re-
quires close to no time, our net speedup will still only be 1
/
0
.
4
=
2
.
5. We saw this
performance with our dictionary program as we replaced insertion sort by quick-
sort. The initial version spent 173.05 of its 177.57 seconds performing insertion
sort, giving
α
=
0
.
975. With quicksort, the time spent sorting becomes negligible,
giving a predicted speedup of 39.3. In fact, the actual measured speedup was a
bit less: 173
.
05
/
4
.
72
=
37
.
6, due to inaccuracies in the profiling measurements. We
were able to gain a large speedup because sorting constituted a very large fraction
of the overall execution time.
Amdahl’s law describes a general principle for improving any process. In
addition to applying to speeding up computer systems, it can guide a company
trying to reduce the cost of manufacturing razor blades, or a student trying to
improve his or her gradepoint average. Perhaps it is most meaningful in the world
of computers, where we routinely improve performance by factors of 2 or more.
Such high factors can only be achieved by optimizing large parts of a system.
5.15
Summary
Although most presentations on code optimization describe how compilers can
generate efficient code, much can be done by an application programmer to assist
the compiler in this task. No compiler can replace an inefficient algorithm or data
structure by a good one, and so these aspects of program design should remain
a primary concern for programmers. We also have seen that optimization block-
ers, such as memory aliasing and procedure calls, seriously restrict the ability of
compilers to perform extensive optimizations. Again, the programmer must take
primary responsibility for eliminating these. These should simply be considered
parts of good programming practice, since they serve to eliminate unneeded work.
Tuning performance beyond a basic level requires some understanding of the
processor’s microarchitecture, describing the underlying mechanisms by which
the processor implements its instruction set architecture. For the case of out-of-
order processors, just knowing something about the operations, latencies, and
issue times of the functional units establishes a baseline for predicting program
performance.
 
Amdahl’s law describes a general principle for improving any process. In

addition to applying to speeding up computer systems, it can guide a company
trying to reduce the cost of manufacturing razor blades, or a student trying to
improve his or her gradepoint average. Perhaps it is most meaningful in the world
of computers, where we routinely improve performance by factors of 2 or more.
Such high factors can only be achieved by optimizing large parts of a system.

regardless of how many processors are devoted to a parallelized execution of this program的更多相关文章

  1. PatentTips - Posting interrupts to virtual processors

    BACKGROUND Generally, the concept of virtualization in information processing systems allows multipl ...

  2. WaitType:CXPACKET

    CXPACKET 等待类型是SQL Server 并发执行一个query时产生的.在run一个big query时,SQL Server充分利用系统的所有资源(CPU,Memory,IO),在最短时间 ...

  3. 5.24 Declaring Attributes of Functions【转】

    转自:https://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Function-Attributes.html 5.24 Declaring Attributes o ...

  4. Part 86 to 88 Talking about Multithreading in C#

    Part 86   Multithreading in C# What is a Process: Process is what the operating system uses to facil ...

  5. 115 Java Interview Questions and Answers – The ULTIMATE List--reference

    In this tutorial we will discuss about different types of questions that can be used in a Java inter ...

  6. 在GDB 中如何记录 instruction-history and function-call-history

    (EDIT: per the first answer below the current "trick" seems to be using an Atom processor. ...

  7. Thinking in Java——笔记(21)

    Concurrency However, becoming adept at concurrent programming theory and techniques is a step up fro ...

  8. The JSR-133 Cookbook for Compiler Writers(an unofficial guide to implementing the new JMM)

    The JSR-133 Cookbook for Compiler Writers by Doug Lea, with help from members of the JMM mailing lis ...

  9. The Go Programming Language. Notes.

    Contents Tutorial Hello, World Command-Line Arguments Finding Duplicate Lines A Web Server Loose End ...

随机推荐

  1. Java Hour 35 Weather ( 8 ) struts2 – message resource

    有句名言,叫做10000小时成为某一个领域的专家.姑且不辩论这句话是否正确,让我们到达10000小时的时候再回头来看吧. Hour 35 刚发表了一条闪存,在这个公司快满3个月了,该正式决定留下来还是 ...

  2. 编辑WCF配置不出现

    在使用VS2010创建

  3. C++的那些事:你真的了解引用吗

    一.引用的本质是什么 说到引用,一般C++的教材中都是这么定义的: 1,引用就是一个对象的别名. 2,引用不是值不占内存空间. 3,引用必须在定义时赋值,将变量与引用绑定. 那你有没有想过,上面的定义 ...

  4. 2016"百度之星" - 初赛(Astar Round2A)1002 / HDU 5691 状态压缩DP

    Sitting in Line Problem Description   度度熊是他同时代中最伟大的数学家,一切数字都要听命于他.现在,又到了度度熊和他的数字仆人们玩排排坐游戏的时候了.游戏的规则十 ...

  5. css实现三角形图标

    css边框和相框构造是一样的,看下面这代css代码: <div style="border-color: red blue black green;border-style: soli ...

  6. SU suspecfk命令学习

    用suplane生成平面,并查看其FK谱, 水平反射界面经FK变换后,波数为0, 正好处于临界,乃奎斯特频率, 有空间假频, Over,不足之处,欢迎批评指正.

  7. LightOJ1326 Race(DP)

    题目问N匹马比赛有多少种结果.一开始想用排列组合搞搞,然后发现想错了.艰难地把思路转向DP,最后AC了. dp[i][j]表示前i匹马确定出j个名次的方案数 dp[1][1]=1 对于第i匹马,它要确 ...

  8. 使用WebRequest 检测 手机号归属地。 C#通用 使用json 和可设定超时的WebClient

    首先建立jsonObject,当然你也可以使用xml解析,目前介绍一下我使用的方法. /******************************************************** ...

  9. Remove Duplicates from Sorted List II leetcode java

    题目: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct ...

  10. POJ 1925 Spiderman(DP)

    题目链接 这个破题,好不容易思路清楚了,写的就是过不了..关键部分直接抄的别人的...终于A了,自己写的判断什么的,就是有一组数据过不了. #include <cstdio> #inclu ...