Convert notes into blockquotes
This commit is contained in:
parent
832fb15e54
commit
8ed9dea394
105 changed files with 884 additions and 411 deletions
17
39-04.md
17
39-04.md
|
|
@ -17,10 +17,19 @@ states. With those wait states factored out, the assembly language
|
|||
version of **DrawHorizontalLineList** becomes almost three times as fast
|
||||
as the C code.
|
||||
|
||||
------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
 *There is a lesson here. An optimization has no fixed payoff; its value fluctuates according to the context in which it is used. There's relatively little benefit to further optimizing code that already spends half its time waiting for display memory; no matter how good your optimizations, you'll get only a two-times speedup at best, and generally much less than that. There is, on the other hand, potential for tremendous improvement when drawing to system memory, so if that's where most of your drawing will occur, optimizations such as Listing 39.3 are well worth the effort.*
|
||||
*Know the environments in which your code will run, and know where the cycles go in those environments.*
|
||||
------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
> 
|
||||
> There is a lesson here. An optimization has no fixed payoff; its value
|
||||
> fluctuates according to the context in which it is used. There's
|
||||
> relatively little benefit to further optimizing code that already spends
|
||||
> half its time waiting for display memory; no matter how good your
|
||||
> optimizations, you'll get only a two-times speedup at best, and
|
||||
> generally much less than that. There is, on the other hand, potential
|
||||
> for tremendous improvement when drawing to system memory, so if that's
|
||||
> where most of your drawing will occur, optimizations such as Listing
|
||||
> 39.3 are well worth the effort.
|
||||
>
|
||||
> Know the environments in which your code will run, and know where the
|
||||
> cycles go in those environments.
|
||||
|
||||
**LISTING 39.3 L39-3.ASM**
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue