Convert notes into blockquotes

This commit is contained in:
James Gregory 2013-12-31 11:06:31 +11:00
commit 8ed9dea394
105 changed files with 884 additions and 411 deletions

View file

@ -58,9 +58,13 @@ state of our Game of Life implementation, the only areas worth looking
at for possible optimizations are **cell\_state()** and
**next\_generation().**
------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
![](images/i.jpg) *It's worth noting, though, that one reason **draw\_pixel()** doesn't much affect performance is that in Listing 17.1, we're smart enough to redraw pixels only when their states change, rather than during every generation. Detecting and eliminating redundant operations is part of knowing the nature of your data, and is a potent optimization technique that will be extremely useful a little later in this chapter.*
------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> ![](images/i.jpg)
> It's worth noting, though, that one reason **draw\_pixel()** doesn't
> much affect performance is that in Listing 17.1, we're smart enough to
> redraw pixels only when their states change, rather than during every
> generation. Detecting and eliminating redundant operations is part of
> knowing the nature of your data, and is a potent optimization technique
> that will be extremely useful a little later in this chapter.
### The Hazards and Advantages of Abstraction {#Heading6}
@ -81,9 +85,11 @@ know the cell storage format! This is a wonderful thing, in general; it
saves programming time and bugs, and frees you to work on the
application's needs, rather than implementation details.
------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
![](images/i.jpg) *However, if you never look beneath the surface of the abstract model at the implementation details, you have no idea of what the true performance cost of various operations* *is, and, without that, you have largely surrendered control over performance.*
------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> ![](images/i.jpg)
> However, if you never look beneath the surface of the abstract model at
> the implementation details, you have no idea of what the true performance
> cost of various operations is, and, without that, you have largely
> surrendered control over performance.
Having said that, let me hasten to add that algorithmic improvements can
make a big difference even when working at a purely abstract level. For