Change bold code snippets to inline code blocks
This commit is contained in:
parent
f658bfbb40
commit
3c76d884ef
185 changed files with 1772 additions and 1772 deletions
12
14-04.md
12
14-04.md
|
|
@ -162,16 +162,16 @@ void main() {
|
|||
Well, architecture carries a lot of weight, but it sure as heck isn't
|
||||
destiny. I had simply fallen into the trap of figuring that the
|
||||
algorithm was so clever that I didn't have to do any thinking myself.
|
||||
The path leading to **REPNZ SCASB** from the original brute-force
|
||||
approach of **REPZ CMPSB** at every location had been based on my
|
||||
The path leading to `REPNZ SCASB` from the original brute-force
|
||||
approach of `REPZ CMPSB` at every location had been based on my
|
||||
observation that the first character comparison at each buffer location
|
||||
usually fails. Why not apply the same concept to Boyer-Moore? Listing
|
||||
14.3 is just like the standard implementation—except that it's optimized
|
||||
to handle a first-comparison mismatch as quickly as possible in the loop
|
||||
at **QuickSearchLoop**, much as **REPNZ SCASB** optimizes
|
||||
at `QuickSearchLoop`, much as `REPNZ SCASB` optimizes
|
||||
first-comparison mismatches for the brute-force approach. The results in
|
||||
Table 14.1 speak for themselves; Listing 14.3 is more than twice as fast
|
||||
as what I assure you was already a nice, tight assembly implementation
|
||||
(and unrolling **QuickSearchLoop** could boost performance by up to 10
|
||||
percent more). Listing 14.3 is also *four times* faster than **REPNZ
|
||||
SCASB** in one case.
|
||||
(and unrolling `QuickSearchLoop` could boost performance by up to 10
|
||||
percent more). Listing 14.3 is also *four times* faster than `REPNZ
|
||||
SCASB` in one case.
|
||||
Loading…
Reference in a new issue