Convert notes into blockquotes
This commit is contained in:
parent
832fb15e54
commit
8ed9dea394
105 changed files with 884 additions and 411 deletions
14
16-04.md
14
16-04.md
|
|
@ -52,9 +52,10 @@ base+index addressing (**[EBX+EAX]**), which saves a cycle on the 386.
|
|||
Second: Changing the instruction to **CMP [EAX],DH** saved 2 cycles—just
|
||||
enough, by good fortune, to speed up the whole program by 5 percent.
|
||||
|
||||
------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
 ***CMP reg,[mem]** takes 6 cycles on the 386, but **CMP [ mem ],reg** takes only 5 cycles; you should always perform**CMP** with the memory operand on the left on the 386.*
|
||||
------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
> 
|
||||
> **CMP reg,[mem]** takes 6 cycles on the 386, but **CMP [ mem ],reg**
|
||||
> takes only 5 cycles; you should always perform**CMP** with the memory
|
||||
> operand on the left on the 386.
|
||||
|
||||
(Granted, **CMP [*mem*],*reg*** is 1 cycle slower than **CMP
|
||||
*reg*,[*mem*]** on the 286, and they're both the same on the 8088; in
|
||||
|
|
@ -99,9 +100,10 @@ faster. Consider the incongruity of Terje's willingness to consider a 5
|
|||
percent speedup significant in light of his later near-doubling of
|
||||
performance.
|
||||
|
||||
------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
 *Don't get stuck in the rut of instruction-by-instruction optimization. It's useful in key loops, but very often, a change in approach will work far greater wonders than any amount of cycle counting can.*
|
||||
------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
> 
|
||||
> Don't get stuck in the rut of instruction-by-instruction optimization.
|
||||
> It's useful in key loops, but very often, a change in approach will work
|
||||
> far greater wonders than any amount of cycle counting can.
|
||||
|
||||
By the way, Terje's WC50 program is a full-fledged counting program; it
|
||||
counts characters, words, and lines, can handle multiple files, and lets
|
||||
|
|
|
|||
Loading…
Reference in a new issue