<?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>15350</bug_id>
          
          <creation_ts>2007-10-02 16:08:22 -0700</creation_ts>
          <short_desc>skip extra hash lookup and avoid converting char* to UString for 19% speedup on CK JS array test</short_desc>
          <delta_ts>2007-10-02 20:51:52 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>523.x (Safari 3)</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>http://celtickane.com/projects/jsspeed2007.php</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Maciej Stachowiak">mjs</reporter>
          <assigned_to name="Maciej Stachowiak">mjs</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57679</commentid>
    <comment_count>0</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2007-10-02 16:08:22 -0700</bug_when>
    <thetext>The Celtic Kane JavaScript Benchmark &quot;Array&quot; test can be sped up 19% by using the return value from add() to avoid an extra hash lookup for contains(), and by storing some strings in function-scope static UString variables instead of as constant strings used to make new UStrings every time. These issues mainly affect the Array &quot;join&quot; and &quot;toString&quot; operations, which unfortunately seem to make up the vast majority of time on this benchmark.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57682</commentid>
    <comment_count>1</comment_count>
      <attachid>16509</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2007-10-02 16:30:12 -0700</bug_when>
    <thetext>Created attachment 16509
patch implementing these two optimizations</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57684</commentid>
    <comment_count>2</comment_count>
      <attachid>16509</attachid>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2007-10-02 16:37:17 -0700</bug_when>
    <thetext>Comment on attachment 16509
patch implementing these two optimizations

ooh, nice and simple</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>16509</attachid>
            <date>2007-10-02 16:30:12 -0700</date>
            <delta_ts>2007-10-02 16:37:17 -0700</delta_ts>
            <desc>patch implementing these two optimizations</desc>
            <filename>array-join-speedups.patch.txt</filename>
            <type>text/plain</type>
            <size>1512</size>
            <attacher name="Maciej Stachowiak">mjs</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDI1OTI5
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTMgQEAKKzIwMDctMTAt
MDIgIE1hY2llaiBTdGFjaG93aWFrICA8bWpzQGFwcGxlLmNvbT4KKworICAgICAgICBSZXZpZXdl
ZCBieSBOT0JPRFkgKE9PUFMhKS4KKyAgICAgICAgCisgICAgICAgIC0gc2tpcCBleHRyYSBoYXNo
IGxvb2t1cCBhbmQgYXZvaWQgY29udmVydGluZyBjaGFyKiB0byBVU3RyaW5nIGZvciAxOSUgc3Bl
ZWR1cCBvbiBDSyBKUyBhcnJheSB0ZXN0IAorICAgICAgICBodHRwOi8vYnVncy53ZWJraXQub3Jn
L3Nob3dfYnVnLmNnaT9pZD0xNTM1MAorCisgICAgICAgICoga2pzL2FycmF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ganNTdHJpbmcoZW1wdHkpOworICAgIFVTdHJpbmcgc2VwYXJhdG9yID0gY29tbWE7Cisg
ICAgVVN0cmluZyBzdHIgPSBlbXB0eTsKIAotICAgIHZpc2l0ZWRFbGVtcy5hZGQodGhpc09iaik7
CiAgICAgaWYgKGlkID09IEpvaW4gJiYgIWFyZ3NbMF0tPmlzVW5kZWZpbmVkKCkpCiAgICAgICAg
IHNlcGFyYXRvciA9IGFyZ3NbMF0tPnRvU3RyaW5nKGV4ZWMpOwogICAgIGZvciAodW5zaWduZWQg
aW50IGsgPSAwOyBrIDwgbGVuZ3RoOyBrKyspIHsK
</data>
<flag name="review"
          id="6960"
          type_id="1"
          status="+"
          setter="oliver"
    />
          </attachment>
      

    </bug>

</bugzilla>