<?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>186193</bug_id>
          
          <creation_ts>2018-06-01 06:33:10 -0700</creation_ts>
          <short_desc>[JSC] NewArrayBuffer should have non-CoW mode</short_desc>
          <delta_ts>2018-06-19 07:01:45 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>186724</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Yusuke Suzuki">ysuzuki</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>saam</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1429205</commentid>
    <comment_count>0</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2018-06-01 06:33:10 -0700</bug_when>
    <thetext>In some program, array created by new_array_buffer is not immutable (I think Kraken/crypto-aes and SixSpeed spread-literal.es5 are).
But ArrayifyToStructure&apos;s array copying is really slow compared to non CoW array creation in NewArrayBuffer.
I think we should have non-CoW mode for NewArrayBuffer / new_array_buffer. ArrayAllocationProfile should carefully profile the use of resulted array, and tell us whether using CoW mode is profitable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1429232</commentid>
    <comment_count>1</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2018-06-01 08:55:24 -0700</bug_when>
    <thetext>Why is arrayify to structure slow?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1429357</commentid>
    <comment_count>2</comment_count>
    <who name="Keith Miller">keith_miller</who>
    <bug_when>2018-06-01 14:10:27 -0700</bug_when>
    <thetext>It seems like if this is a problem the fix is to make Arrayification faster. Since the total amount of work duplicating the butterfly should be the same either way, I don&apos;t see any obvious reason to eagerly copy.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>