Normal quotes
This commit is contained in:
parent
5e10794a24
commit
18011c595a
352 changed files with 6040 additions and 6040 deletions
20
04-10.md
20
04-10.md
|
|
@ -21,7 +21,7 @@ instructions per microsecond than can the 8088-based PC, it takes just
|
|||
as long to access display memory on those computers as on the 8088-based
|
||||
PC. Remember, the limited speed of access to a graphics adapter is an
|
||||
inherent characteristic of the adapter, so the fastest computer around
|
||||
can’t access display memory one iota faster than the adapter will allow.
|
||||
can't access display memory one iota faster than the adapter will allow.
|
||||
|
||||
#### What to Do about the Display Adapter Cycle-Eater? {#Heading22}
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ used to mask individual pixels and clip images. Why? Because
|
|||
read/modify/write operations require two display memory accesses (one
|
||||
read and one write) each time display memory is manipulated. Instead, we
|
||||
should try to use writes of the sort that set all the pixels in a given
|
||||
byte of display memory at once, since such writes don’t require
|
||||
byte of display memory at once, since such writes don't require
|
||||
accompanying read accesses. The key here is that only half as many
|
||||
display memory accesses are required to write a byte to display memory
|
||||
as are required to read a byte from display memory, mask part of it off
|
||||
|
|
@ -67,7 +67,7 @@ states.)
|
|||
|
||||
It would be handy to explore the display adapter cycle-eater issue in
|
||||
depth, with lots of example code and execution timings, but alas, I
|
||||
don’t have the space for that right now. For the time being, all you
|
||||
don't have the space for that right now. For the time being, all you
|
||||
really need to know about the display adapter cycle-eater is that on the
|
||||
8088 you can lose more than 8 cycles of execution time on each access to
|
||||
display memory. For intensive access to display memory, the loss really
|
||||
|
|
@ -80,10 +80,10 @@ code, and that is of course to measure the performance of that code.
|
|||
|
||||
#### Cycle-Eaters: A Summary {#Heading23}
|
||||
|
||||
We’ve covered a great deal of sophisticated material in this chapter, so
|
||||
don’t feel bad if you haven’t understood everything you’ve read; it will
|
||||
We've covered a great deal of sophisticated material in this chapter, so
|
||||
don't feel bad if you haven't understood everything you've read; it will
|
||||
all become clear from further reading, especially once you study, time,
|
||||
and tune code that you have written yourself. What’s really important is
|
||||
and tune code that you have written yourself. What's really important is
|
||||
that you come away from this chapter understanding that on the 8088:
|
||||
|
||||
- The 8-bit bus cycle-eater causes each access to a word-sized operand
|
||||
|
|
@ -100,24 +100,24 @@ that you come away from this chapter understanding that on the 8088:
|
|||
|
||||
This basic knowledge about cycle-eaters puts you in a good position to
|
||||
understand the results reported by the Zen timer, and that means that
|
||||
you’re well on your way to writing high-performance assembler code.
|
||||
you're well on your way to writing high-performance assembler code.
|
||||
|
||||
#### What Does It All Mean? {#Heading24}
|
||||
|
||||
There you have it: life under the programming interface. It’s not a
|
||||
There you have it: life under the programming interface. It's not a
|
||||
particularly pretty picture for the inhabitants of that strange realm
|
||||
where hardware and software meet are little-known cycle-eaters that sap
|
||||
the speed from your unsuspecting code. Still, some of those cycle-eaters
|
||||
can be minimized by keeping instructions short, using the registers,
|
||||
using byte-sized memory operands, and accessing display memory as little
|
||||
as possible. None of the cycle-eaters can be eliminated, and dynamic RAM
|
||||
refresh can scarcely be addressed at all; still, aren’t you better off
|
||||
refresh can scarcely be addressed at all; still, aren't you better off
|
||||
knowing how fast your code *really* runs—and why—than you were reading
|
||||
the official execution times and guessing? And while specific
|
||||
cycle-eaters vary in importance on later x86-family processors, with
|
||||
some cycle-eaters vanishing altogether and new ones appearing, the
|
||||
concept that understanding these obscure gremlins is a key to
|
||||
performance remains unchanged, as we’ll see again and again in later
|
||||
performance remains unchanged, as we'll see again and again in later
|
||||
chapters.
|
||||
|
||||
------------------------ --------------------------------- --------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue