首页 > 其他 > 详细

18645 How to write fast code期中准备

时间:2014-03-01 06:57:32      阅读:619      评论:0      收藏:0      [点我收藏+]

/*******************************************************************************************/

提高代码运行速度可以采用以下方法:

一是运用好的platform:

Multi-core platforms

Many-core platforms

Cloud platforms

二是优化数据结构,算法,software architecture(这是个啥????)

/*******************************************************************************************/

第一章 简介

Computing platform的变化趋势: transistor integration(晶体集成)指数增长,clock speed,power consumption(功耗),performance per block逐渐趋于稳定

HPC: high performance computing

multi-core 是 each core optimized for executing a single thread

many-core是针对总输出进行优化的,并不注重单个thread的performance

multicore和manycore parallelism 的共同点:

都increase vector unit width(是啥?)

都increase number of cores per die(又是啥?)

都increase bandwidth to off-cheap memory(是啥???)


/*******************************************************************************************/

第二章 Multi-core

load-store architecture:MIPS架构英语MIPS architecture,为Microprocessor without Interlocked Pipeline Stages的缩写,亦为Millions of Instructions Per Second的相关语),是一种采取精简指令集(RISC)的处理器架构,1981年出现,由MIPS科技公司开发并授权,广泛被使用在许多电子产品、网络设备、个人娱乐装置与商业装置上。最早的MIPS架构是32位元,最新的版本已经变成64位元。


Instruction level parallelism: 

出发点:使得给定的single, sequential stream of instructions运行得as fast as possible

优点:no changes in sequential software necessary. 

确定:处理器构架明显更复杂

            所需设计时间更长

            处理器设计正确性的验证所需时间更长

            和single in-order的处理器相比消耗更大


一共有四种Taxonomy:

SISD: 无parallelism

SIMD: explicitly exploits data parallelism 

MISD: redundancy(用在控制space shuttle flight control中)

MIMD: distributed computing


16-way SIMD 是指width是16??????


__128: 128-bit operands


bubuko.com,布布扣

SIMD:

出发点:reduce processor complexity by explicitly representing instruction level parallelism in vector form

优点:power-efficient way to improve instruction throughput

           exploitable in many compute-intensive applications

缺点:may require hand-tuning(是啥??)to exploit full benefit

           software requires re-compilation to take advantage of new SIMD capabilities(为啥是缺点??)

           explicit representation in vector instructions(为啥是缺点??)       


simultaneous multithreading:

出发点:当不知一个thread of instruction可以用时提高performance

优点:gain power efficiency by increasing increase pipeline utilization

缺点: requires multithreads available 

            may trigger conflicts in shared cache during execution

            does not improve latency of each thread


Latency: from start to finish, in units of time.     e.g. CPU Clock Cycles

Throughtput: tasks accomplished per unit time.    e.g. GB/s  

/*******************************************************************************************/

先把问题列出来:

What are the differences between multi-core and many-core processors?

What is instruction level parallelism? What is SIMD?

What is simultaneous multi-threading?

What are the three metrics for a memory hierarchy?

What are the different system granularities?

How is this relevant to writing fast code?



recursion可以使code简单,但是占据stack太多可能over flow

static, dynamic?? type checking?? 

type checking is harder to debug

git merge, git rebase????

rationale database

garbage collector


18645 How to write fast code期中准备,布布扣,bubuko.com

18645 How to write fast code期中准备

原文:http://blog.csdn.net/he_wolf/article/details/20119549

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!