Strip comments and inline ids onto h*

This commit is contained in:
James Gregory 2013-12-30 15:11:04 +11:00
commit 0f5f617adb
362 changed files with 2519 additions and 6694 deletions

View file

@ -10,16 +10,9 @@
<meta name="vspubdate" content="07/01/97" />
<meta name="vscategory" content="Web and Software Development: Game Development,Web and Software Development: Graphics and Multimedia Development" />
<title>Michael Abrash's Graphics Programming Black Book Special Edition: The Best Optimizer Is between Your Ears</title><!-- HEADER -->
<!-- Empty Reference Subhead -->
<!--ISBN=1576101746//-->
<!--TITLE=Michael Abrash's Graphics Programming Black Book Special Edition//-->
<!--AUTHOR=Michael Abrash//-->
<!--PUBLISHER=The Coriolis Group, Inc.//-->
<title>Michael Abrash's Graphics Programming Black Book Special Edition: The Best Optimizer Is between Your Ears</title>
<meta name="chapter" content="01" />
<meta name="pages" content="018-019" />
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
</head>
<body>
@ -37,7 +30,7 @@
<p><br /></p>
<p><b>LISTING 1.7 L1-7.ASM</b></p><!-- CODE //-->
<p><b>LISTING 1.7 L1-7.ASM</b></p>
<pre>
; Assembler subroutine to perform a 16-bit checksum on a block of
; bytes 1 to 64K in size. Adds checksum for block into passed-in
@ -88,7 +81,7 @@ ChecksumLoop:
ret
_ChecksumChunkendp
end
</pre><!-- END CODE //-->
</pre>
<p>Note that in Table 1.1, optimization makes little difference except in the case of Listing 1.5, where the design has been refined considerably. Execution time in the other cases is dominated by time spent in DOS and/or the C library, so optimization of the code you write is pretty much irrelevant. What&rsquo;s more, while the approximately two-times improvement we got by optimizing is not to be sneezed at, it pales against the up-to-50-times improvement we got by redesigning.</p>
@ -104,13 +97,13 @@ _ChecksumChunkendp
<p>All this is basically a way of saying: Know where you&rsquo;re going, know the territory, and know when it matters.</p>
<h3><a id="Heading13"></a>Where We&rsquo;ve Been, What We&rsquo;ve Seen</h3>
<h3 id="Heading13">Where We&rsquo;ve Been, What We&rsquo;ve Seen</h3>
<p>What have we learned? Don&rsquo;t let other people&rsquo;s code&mdash;even DOS&mdash;do the work for you when speed matters, at least not without knowing what that code does and how well it performs.</p>
<p>Optimization only matters after you&rsquo;ve done your part on the program design end. Consider the ratios on the vertical axis of Table 1.1, which show that optimization is almost totally wasted in the checksumming application without an efficient design. Optimization is no panacea. Table 1.1 shows a two-times improvement from optimization&mdash;and a 50-times-plus improvement from redesign. The longstanding debate about which C compiler optimizes code best doesn&rsquo;t matter quite so much in light of Table 1.1, does it? Your organic optimizer matters much more than your compiler&rsquo;s optimizer, and there&rsquo;s always assembly for those usually small sections of code where performance really matters.</p>
<h4 align="left"><a id="Heading14"></a>Where We&rsquo;re Going</h4>
<h4 align="left" id="Heading14">Where We&rsquo;re Going</h4>
<p>This chapter has presented a quick step-by-step overview of the design process. I&rsquo;m not claiming that this is the only way to create high-performance code; it&rsquo;s just an approach that works for me. Create code however you want, but never forget that design matters more than detailed optimization. Never stop looking for inventive ways to boost performance&mdash;and never waste time speeding up code that doesn&rsquo;t need to be sped up.</p>
@ -133,10 +126,6 @@ _ChecksumChunkendp
<div align="center">
Graphics Programming Black Book &copy; 2001 Michael Abrash
</div><!-- all of the reference materials (books) have the footer and subfoot reveresed -->
<!-- reference_subfoot = footer -->
<!-- reference_footer = subfoot -->
<!-- BEGIN SUB FOOTER -->
<!-- END FOOTER -->
</div>
</body>
</html>