Michael Abrash‘s black book--第一章--1.1

10 篇文章 0 订阅
4 篇文章 0 订阅

Chapter 1 -  The Best Optimizer Is between Your Ears
最好的优化在你的两耳间---最好的优化器是你的大脑

1.1 The Human Element of Code Optimization--代码优化中的人为因素

This book is devoted to a topic near and dear to my heart: writing software that pushes PCs to the limit. Given run-of-the-mill(普通的) software, PCs run like the 97-pound-weakling minicomputers they are. Give them the proper care, however, and those ugly boxes are capable of miracles(奇迹). The key is this: Only on microcomputers do you have the run of the whole machine, without layers of operating systems, drivers, and the like getting in the way. You can do anything you want, and you can understand everything that's going on, if you so wish.
本书致力于阐述的主题极其接近我的心愿:编写软件把PC推至极限。给它普通软件,PC运行起来像一个97磅的虚弱的微机。然而给它精心设计的软件,这个丑陋的盒子能创造奇迹。关键是:只有在微机上,你可以在真个机器上运行,没有操作系统、驱动等其他层阻挡。你可以做任何你想做的事情,并且你可以理解你想理解的任何事情的来龙去脉。---这确实是dos时代的福利,也是因为控制权下放,所以dos下病毒特别多

As we'll see shortly, you should indeed so wish.
很快我们就能发现,你应该真的可以实现这个愿望。

Is performance still an issue in this era of cheap 486 computers and super-fast Pentium computers? You bet(当然).  How many programs that you use really run so fast that wouldn't be happier if they ran faster? We're so used to slow software that when a compile-and-link sequence that took two minutes on a PC takes just ten seconds on a 486 computer, we're ecstatic (狂喜)-- when in truth we should be settling for nothing(不满足) less than instantaneous response.
性能仍旧是个问题吗?在这个拥有便宜的486计算机和奔腾超级计算机的时代? 当然。
有多少你使用的程序运行的如此之快以至于运行再快你也不会高兴?
我们已如此习惯于缓慢软件,以至于当一个编译连接序列在一个PC机上花费2分钟,在486机器上只花费10秒,我们会欣喜若狂。其实我们应该不满足除非能瞬间响应。

Impossible, you say? Not with the proper design, including incremental compilation and linking, use of extended and/or expanded memory, and well-crafted code. PCs can do just about anything you can imagine (with a few obvious exceptions, such as applications involving super-computer-class number-crunching 数字运算) if you believe that it can be done, if you understand the computer inside and out, and if you 're willing to think past the obvious solution to unconventional but potentially more fruitful (富有成效的) approaches.
你认为不可能?如果没有合适的设计,包括增强的编译和链接技术,使用扩充或者扩展内存(dos专有名词,现在的操作系统已经没有这个概念了,配置过config.sys的同学懂得),精心编制的代码,是不可能的。
PC 能做你可以想象的任何事情,除了一部分例外,比如设计超级计算机的数字运算。如果你相信计算机可以做到,并且你理解计算机的里里外外,并且如果你想到非常规的富有成效的方法。---直译,也可以把如果放到前面,更符合汉语习惯。

My point is simply this: PCs can work wonders. It 's not easy coaxing them into doing that, but it's rewarding(值得的) -- and it's sure as heck fun.  In this book, we're going to work some of those wonders, starting...
...now.

我的观点是简单的:PC能够创造奇迹,做到这些是不容易的,但是值得做的---并且确实很有趣。这本书中,我们将创造一些奇迹,让我们现在开始吧...

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值