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. 【vijos1659】河蟹王国 线段树<区间修改+区间最大值>

    描述 河蟹王国有一位河蟹国王,他的名字叫羊驼.河蟹王国富饶安定,人们和谐相处.有一天,羊驼国王心血来潮,想在一部分人中挑出最和谐的人.于是,羊驼国王将他的子民排成了一列(==!!b汗~好长呀).每个人 ...

  2. 4KB对齐

    4KB是固态硬盘的读写基本block size的大小也就是说读写的基本单位是4KB,哪怕1B的内容读写实际操作也是操作了4KB的块实际操作是以块为单位的 假设我的读写起始点刚好定在两个4KB大小的物理 ...

  3. python list append方法

    keyValueResult = {'a': 1, 'b': 2} sendData = [] def set_push_format(ip): data_format = { "endpo ...

  4. Android应用开发--MP3音乐播放器代码实现(一)

    需求1:将内存卡中的MP3音乐读取出来并显示到列表当中 1.   从数据库中查询所有音乐数据,保存到List集合当中,List当中存放的是Mp3Info对象 2.   迭代List集合,把每一个Mp3 ...

  5. CodeForces 433C Ryouko's Memory Note-暴力

                                             Ryouko's Memory Note Time Limit:1000MS     Memory Limit:262 ...

  6. ZOJ 3905 Cake ZOJ Monthly, October 2015 - C

    Cake Time Limit: 4 Seconds      Memory Limit: 65536 KB Alice and Bob like eating cake very much. One ...

  7. Lazy Load, 延迟加载图片的 jQuery 插件【备忘】

    http://www.neoease.com/lazy-load-jquery-plugin-delay-load-image/ jQuery Unveil – 另一款非常轻量的延迟加载插件 http ...

  8. Uiautomator打包使用第三方库,报错的解决方案

    问题引源: 在做自动化过程中,想在用例执行完毕后,自动生成该用例测试报告: 报告定义为Excel格式文件,且在用例执行过程中生成. 所以我在Uiautomator工程中引用了jxl.jar,用以处理E ...

  9. Qt Creator 快捷键

    Qt Creator 你必须要掌握的快捷操作 http://jingyan.baidu.com/article/6fb756ecab5158241858fbb0.html 多使用快捷键能显著提高工作效 ...

  10. hdu City Game

    做这题之前建议做一下hdu1506题,两道题是极度相似的题,不同的是这个要处理的是m行,所以可以用一个dp[][]数组存储矩形的高度,之后就变成hdu1506了. 例如测试样例: 0 1 1 1 1 ...