Replace invalid characters with HTML entities
— with — ’ with ’ + with + × with x ç with ç “ with “ ” with ” ‘ with ‘ • with • – with - µ with µ † with † Fix C++ θ with θ Yen symbol instead of times Fix broken apos Bullet again E-circumflex
This commit is contained in:
parent
9e52de9586
commit
500e7f5654
353 changed files with 5091 additions and 5091 deletions
18
14-03.html
18
14-03.html
|
|
@ -36,17 +36,17 @@
|
|||
</TABLE>
|
||||
</CENTER>
|
||||
<P><BR></P>
|
||||
<P>How fast <I>is</I> Boyer-Moore? Listing 14.1 is a C implementation of Boyer-Moore searching; Listing 14.2 is a test-bed program that searches up to the first 32K of a file for a pattern. Table 14.1 (all times measured with Turbo Profiler on a 20 MHz cached 386, searching a modified version of the text of this chapter) shows that this implementation is generally much slower than <B>REPNZ SCASB,</B> although it does come close when searching for long patterns. Listing 14.1 is designed primarily to make later assembly implemenmore comprehensible, rather than faster; Sedge’s implementation uses arrays rather than pointers, is a great deal more compact and very clever, and may be somewhat faster. Regardless, the far superior performance of <B>REPNZ SCASB</B> clearly indicates that assembly language is in order at this point.</P>
|
||||
<P>How fast <I>is</I> Boyer-Moore? Listing 14.1 is a C implementation of Boyer-Moore searching; Listing 14.2 is a test-bed program that searches up to the first 32K of a file for a pattern. Table 14.1 (all times measured with Turbo Profiler on a 20 MHz cached 386, searching a modified version of the text of this chapter) shows that this implementation is generally much slower than <B>REPNZ SCASB,</B> although it does come close when searching for long patterns. Listing 14.1 is designed primarily to make later assembly implemenmore comprehensible, rather than faster; Sedge’s implementation uses arrays rather than pointers, is a great deal more compact and very clever, and may be somewhat faster. Regardless, the far superior performance of <B>REPNZ SCASB</B> clearly indicates that assembly language is in order at this point.</P>
|
||||
<TABLE WIDTH="100%"><TR>
|
||||
<TD COLSPAN="7"><HR>
|
||||
<TR>
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="30%">
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="10%">“g;”
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="10%">“Yogi”
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="10%">“igoY”
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="10%">“Adrian”
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="10%">“Conclusion”
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="20%">“You don’t know what you know”
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="10%">“g;”
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="10%">“Yogi”
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="10%">“igoY”
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="10%">“Adrian”
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="10%">“Conclusion”
|
||||
<TH VALIGN="BOTTOM" ALIGN="LEFT" WIDTH="20%">“You don’t know what you know”
|
||||
<TR>
|
||||
<TD COLSPAN="7"><HR>
|
||||
<TR>
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
<TD VALIGN="TOP" ALIGN="LEFT">4.0
|
||||
<TD VALIGN="TOP" ALIGN="LEFT">2.0
|
||||
<TR>
|
||||
<TD VALIGN="TOP" ALIGN="LEFT"><=255 pattern length + sentinelBoyer-Moore in ASM(Listing 14.4)
|
||||
<TD VALIGN="TOP" ALIGN="LEFT"><=255 pattern length + sentinelBoyer-Moore in ASM(Listing 14.4)
|
||||
<TD VALIGN="TOP" ALIGN="LEFT">8.1
|
||||
<TD VALIGN="TOP" ALIGN="LEFT">5.2
|
||||
<TD VALIGN="TOP" ALIGN="LEFT">4.6
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
<TR>
|
||||
<TD COLSPAN="7"><HR>
|
||||
</TABLE>
|
||||
<P>The entry “Standard Boyer-Moore in ASM” in Table 14.1 refers to straight-forward hand optimization of Listing 14.1, code that is not included in this chapter for the perfectly good reason that it is slower in most cases than <B>REPNZ SCASB.</B> I say this casually now, but not so yesterday, when I had all but concluded that Boyer-Moore was simply inferior on the x86, due to two architectural quirks: the string instructions and slow branch. I had even coined a neat phrase for it: Architecture is destiny. Has a nice ring, doesn’t it?</P><P><BR></P>
|
||||
<P>The entry “Standard Boyer-Moore in ASM” in Table 14.1 refers to straight-forward hand optimization of Listing 14.1, code that is not included in this chapter for the perfectly good reason that it is slower in most cases than <B>REPNZ SCASB.</B> I say this casually now, but not so yesterday, when I had all but concluded that Boyer-Moore was simply inferior on the x86, due to two architectural quirks: the string instructions and slow branch. I had even coined a neat phrase for it: Architecture is destiny. Has a nice ring, doesn’t it?</P><P><BR></P>
|
||||
<CENTER>
|
||||
<TABLE BORDER>
|
||||
<TR>
|
||||
|
|
|
|||
Loading…
Reference in a new issue