Strip comments and inline ids onto h*
This commit is contained in:
parent
1997a7846d
commit
0f5f617adb
362 changed files with 2519 additions and 6694 deletions
21
17-05.html
21
17-05.html
|
|
@ -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 Game of Life</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 Game of Life</title>
|
||||
<meta name="chapter" content="17" />
|
||||
<meta name="pages" content="335-338" />
|
||||
<!--UNASSIGNED1//-->
|
||||
<!--UNASSIGNED2//-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
@ -43,11 +36,11 @@
|
|||
|
||||
<p>Not hardly.</p>
|
||||
|
||||
<h3><a id="Heading7"></a>Heavy-Duty C++ Optimization</h3>
|
||||
<h3 id="Heading7">Heavy-Duty C++ Optimization</h3>
|
||||
|
||||
<p>Before we get to assembly, we still have to perform C<small>++</small> optimization, then see if we can find an alternative approach that better fits the application. It would actually have made much more sense if we had looked for a new approach as our first optimization step, but I decided it would be better to cover straightforward C<small>++</small> optimizations at this point, and the mind-bending stuff a little later. Right now, let’s look at some C<small>++</small> optimizations; Listing 17.4 is a C<small>++</small>-optimized version of Listing 17.3.</p>
|
||||
|
||||
<p><b>LISTING 17.4 L17-4.CPP</b></p><!-- CODE //-->
|
||||
<p><b>LISTING 17.4 L17-4.CPP</b></p>
|
||||
<pre>
|
||||
/* next_generation(), implemented using fast, all-in-one hard-wired
|
||||
neighbor count/update/draw function. Otherwise, the same as
|
||||
|
|
@ -129,7 +122,7 @@ neighbor_count++;
|
|||
row_cell_ptr += width_in_bytes; // point to start of next row
|
||||
}
|
||||
}
|
||||
</pre><!-- END CODE //-->
|
||||
</pre>
|
||||
|
||||
<p>Listing 17.4 and Listing 17.3 are functionally the same; the only difference lies in how <b>next_generation()</b> is implemented. (Only <b>next_generation()</b> is shown in Listing 17.4; the program is otherwise identical to Listing 17.3.) Listing 17.4 applies the following optimizations to <b>next_generation()</b>:</p>
|
||||
|
||||
|
|
@ -164,10 +157,6 @@ neighbor_count++;
|
|||
|
||||
<div align="center">
|
||||
Graphics Programming Black Book © 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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue