<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>7938</bug_id>
          
          <creation_ts>2006-03-23 11:45:37 -0800</creation_ts>
          <short_desc>Shave .2% on PLT by removing bogus strcmp.</short_desc>
          <delta_ts>2006-03-28 14:07:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Eric Seidel (no email)">eric</assigned_to>
          <cc>darin</cc>
    
    <cc>ggaren</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>37429</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2006-03-23 11:45:37 -0800</bug_when>
    <thetext>For whatever reason we had a completely bogus strcmp in HTMLTokenizer which accounted for .2% of all time spent in the PLT (on my MBP):

@@ -901,7 +900,7 @@
                     ptr[--len] = &apos;\0&apos;;
 
                 // Now that we&apos;ve shaved off any invalid / that might have followed the name), make the tag.
-                if (ptr[0] != &apos;!&apos; &amp;&amp; strcmp(ptr, &quot;!doctype&quot;) != 0) {
+                if (ptr[0] != &apos;!&apos;) { // make sure it&apos;s not a !DOCTYPE
                     currToken.tagName = AtomicString(ptr);
                     currToken.beginTag = beginTag;
                 }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37430</commentid>
    <comment_count>1</comment_count>
      <attachid>7255</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2006-03-23 11:46:16 -0800</bug_when>
    <thetext>Created attachment 7255
Remove bogus strcmp to save on plt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37433</commentid>
    <comment_count>2</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2006-03-23 12:44:55 -0800</bug_when>
    <thetext>Can&apos;t &quot;!&quot; also be present for comment elements?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37437</commentid>
    <comment_count>3</comment_count>
      <attachid>7255</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-03-23 13:18:07 -0800</bug_when>
    <thetext>Comment on attachment 7255
Remove bogus strcmp to save on plt

I think the right change is to change the &amp;&amp; to a ||. We&apos;re supposed to allow tags like &lt;!custom&gt; I believe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37440</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2006-03-23 13:28:50 -0800</bug_when>
    <thetext>I had considered the ||, but hyatt and I couldn&apos;t think of any valid use case for !tagname.  I&apos;ll change it to or and add a test case for parsing a &lt;!foo&gt;&lt;/!foo&gt; tag.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37444</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-03-23 13:56:53 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; I had considered the ||, but hyatt and I couldn&apos;t think of any valid use case
&gt; for !tagname.  I&apos;ll change it to or and add a test case for parsing a
&gt; &lt;!foo&gt;&lt;/!foo&gt; tag.

If we&apos;re going to disallow anything starting with &quot;!&quot; (and Dave is definitely an authority on making that call), we should both have tests and also change the comment. I think we can do better than a comment that specifically mentions DOCTYPE and code that checks only for &quot;!&quot;.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>7255</attachid>
            <date>2006-03-23 11:46:16 -0800</date>
            <delta_ts>2006-03-23 13:18:07 -0800</delta_ts>
            <desc>Remove bogus strcmp to save on plt</desc>
            <filename>speed.patch</filename>
            <type>text/plain</type>
            <size>1694</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">SW5kZXg6IGh0bWwvSFRNTFRva2VuaXplci5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gaHRtbC9IVE1MVG9r
ZW5pemVyLmNwcAkocmV2aXNpb24gMTM0NTIpCisrKyBodG1sL0hUTUxUb2tlbml6ZXIuY3BwCSh3
b3JraW5nIGNvcHkpCkBAIC04ODUsOCArODg1LDcgQEAgSFRNTFRva2VuaXplcjo6U3RhdGUgSFRN
TFRva2VuaXplcjo6cGFycwogICAgICAgICAgICAgICAgIGNoYXIqIHB0ciA9IGNCdWZmZXI7CiAg
ICAgICAgICAgICAgICAgdW5zaWduZWQgaW50IGxlbiA9IGNCdWZmZXJQb3M7CiAgICAgICAgICAg
ICAgICAgY0J1ZmZlcltjQnVmZmVyUG9zXSA9ICdcMCc7Ci0gICAgICAgICAgICAgICAgaWYgKChj
QnVmZmVyUG9zID4gMCkgJiYgKCpwdHIgPT0gJy8nKSkKLSAgICAgICAgICAgICAgICB7CisgICAg
ICAgICAgICAgICAgaWYgKChjQnVmZmVyUG9zID4gMCkgJiYgKCpwdHIgPT0gJy8nKSkgewogICAg
ICAgICAgICAgICAgICAgICAvLyBFbmQgVGFnCiAgICAgICAgICAgICAgICAgICAgIGJlZ2luVGFn
ID0gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgIHB0cisrOwpAQCAtOTAxLDcgKzkwMCw3IEBA
IEhUTUxUb2tlbml6ZXI6OlN0YXRlIEhUTUxUb2tlbml6ZXI6OnBhcnMKICAgICAgICAgICAgICAg
ICAgICAgcHRyWy0tbGVuXSA9ICdcMCc7CiAKICAgICAgICAgICAgICAgICAvLyBOb3cgdGhhdCB3
ZSd2ZSBzaGF2ZWQgb2ZmIGFueSBpbnZhbGlkIC8gdGhhdCBtaWdodCBoYXZlIGZvbGxvd2VkIHRo
ZSBuYW1lKSwgbWFrZSB0aGUgdGFnLgotICAgICAgICAgICAgICAgIGlmIChwdHJbMF0gIT0gJyEn
ICYmIHN0cmNtcChwdHIsICIhZG9jdHlwZSIpICE9IDApIHsKKyAgICAgICAgICAgICAgICBpZiAo
cHRyWzBdICE9ICchJykgeyAvLyBtYWtlIHN1cmUgaXQncyBub3QgYSAhRE9DVFlQRQogICAgICAg
ICAgICAgICAgICAgICBjdXJyVG9rZW4udGFnTmFtZSA9IEF0b21pY1N0cmluZyhwdHIpOwogICAg
ICAgICAgICAgICAgICAgICBjdXJyVG9rZW4uYmVnaW5UYWcgPSBiZWdpblRhZzsKICAgICAgICAg
ICAgICAgICB9CgpQcm9wZXJ0eSBjaGFuZ2VzIG9uOiBkb20vUmFuZ2UuaWRsCl9fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18K
TmFtZTogc3ZuOmVvbC1zdHlsZQogICArIG5hdGl2ZQoKSW5kZXg6IENoYW5nZUxvZwo9PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDEzNDU1KQorKysgQ2hhbmdlTG9nCSh3b3JraW5n
IGNvcHkpCkBAIC0xLDMgKzEsMTAgQEAKKzIwMDYtMDMtMjMgIEVyaWMgU2VpZGVsICA8ZXNlaWRl
bEBhcHBsZS5jb20+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAg
ICAgICAgKiBodG1sL0hUTUxUb2tlbml6ZXIuY3BwOgorICAgICAgICAoV2ViQ29yZTo6SFRNTFRv
a2VuaXplcjo6cGFyc2VUYWcpOgorCiAyMDA2LTAzLTIzICBEYXJpbiBBZGxlciAgPGRhcmluQGFw
cGxlLmNvbT4KIAogICAgICAgICAqIGdlbmVyYXRlLWRlcml2ZWQtc291cmNlczogVHdlYWtlZCBm
b3JtYXR0aW5nIGEgdGlueSBiaXQgYW5kIHJlbW92ZWQgYSBzdHJheQo=
</data>
<flag name="review"
          id="1926"
          type_id="1"
          status="-"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>