<?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>199959</bug_id>
          
          <creation_ts>2019-07-19 14:02:48 -0700</creation_ts>
          <short_desc>[JSC] Remove quadratic complexity algorithm in AI structure transition tracking</short_desc>
          <delta_ts>2019-07-20 10:09:26 -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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yusuke Suzuki">ysuzuki</reporter>
          <assigned_to name="Yusuke Suzuki">ysuzuki</assigned_to>
          <cc>keith_miller</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1554307</commentid>
    <comment_count>0</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2019-07-19 14:02:48 -0700</bug_when>
    <thetext>Keith pointed one good idea, converting O(N^2) to O(2N) where N is # of DFG nodes in a basic block.
It&apos;s worth trying!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1554311</commentid>
    <comment_count>1</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2019-07-19 14:14:17 -0700</bug_when>
    <thetext>I believe this improves compile time of JetStream2/octane-zlib.
I&apos;m pretty sure that one of JetStream2/octane-zlib function takes very long time to be compiled and it blocks DFG compilation pipeline and effectively blocks the following compile requests for small hot functions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1554313</commentid>
    <comment_count>2</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2019-07-19 14:20:02 -0700</bug_when>
    <thetext>When I added AI mitigation to my working copy, CNN page is improved, but still it was laggy.
So, fixing AI algorithm does not offer much for CNN page. CNN page&apos;s script is huge, and anyway we should not handle it in DFG.
I think reducing the threshold is the right way to fix CNN page.

On the other hand, we have another compile time problem in JetStream2/octane-zlib.
I know that one of JetStream2/octane-zlib function takes very long time to be compiled and it blocks subsequent DFG compilation requests for small hot functions.
Interestingly, according to the A/B test, the above AI mitigation has performance problem in JetStream2/octane-zlib.
This fact means that JetStream2/octane-zlib has very large basic block which has PutStructure etc., but if we do conservative analysis onto that, it largely regressed the performance of JetStream2/octane-zlib.
So, if we want to improve compile time in JetStream2/octane-zlib, fixing AI algorithm is the right choice.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>