<?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>179230</bug_id>
          
          <creation_ts>2017-11-02 21:34:42 -0700</creation_ts>
          <short_desc>Web Tooling Benchmark: fix RegExp pathologies</short_desc>
          <delta_ts>2018-09-05 11:25:24 -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>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>180537</dependson>
    
    <dependson>180538</dependson>
    
    <dependson>180874</dependson>
    
    <dependson>180876</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="JF Bastien">jfbastien</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          <cc>ap</cc>
    
    <cc>fpizlo</cc>
    
    <cc>jfbastien</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>mjs</cc>
    
    <cc>msaboff</cc>
    
    <cc>rmorisset</cc>
    
    <cc>saam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1367769</commentid>
    <comment_count>0</comment_count>
    <who name="JF Bastien">jfbastien</who>
    <bug_when>2017-11-02 21:34:42 -0700</bug_when>
    <thetext>We seem pathologically slow on the coffeescript part of Web Tooling Benchmark:
  https://v8.github.io/web-tooling-benchmark/
Source:
  https://github.com/bmeurer/web-tooling-benchmark

I get 0.22 runs / sec on STP 42, versus 8.24 runs / sec on Chrome 61.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1367776</commentid>
    <comment_count>1</comment_count>
    <who name="JF Bastien">jfbastien</who>
    <bug_when>2017-11-02 21:46:07 -0700</bug_when>
    <thetext>Non-fork source is actually: https://github.com/v8/web-tooling-benchmark</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1368133</commentid>
    <comment_count>2</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2017-11-03 13:57:06 -0700</bug_when>
    <thetext>We&apos;re spending all our time interpreting these RegExps:

^\s*###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+ 8014.546220ms
^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))? 8179.496043ms
^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)? 2951.752059ms
^(?:[-=]&gt;|[-+*\/%&lt;&gt;&amp;|^!?=]=|&gt;&gt;&gt;=?|([-+:])\1|([&amp;|&lt;&gt;*\/%])\2=?|\?(\.|::)|\.{2,3}) 2888.876650ms

Michael believes we will get much faster if we JIT these patterns.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1368160</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-11-03 14:40:26 -0700</bug_when>
    <thetext>&lt;rdar://problem/35343582&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1382220</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2017-12-15 11:35:32 -0800</bug_when>
    <thetext>Originally, the main RegExp issue was with the coffeescript test which spent most of its time in the aforementioned 4 regular expressions.  Adding JIT support for greedy sub patterns (https://bugs.webkit.org/show_bug.cgi?id=180538) addressed some of these RegExp&apos;s.  There is still the need to add JIT support for back references (https://bugs.webkit.org/show_bug.cgi?id=180874) to address the remaining Yarr interpreter use in coffeescript.

Since this bug was created, the Web Tooling benchmark has changed.  A few new tests have been added.  Two of those new tests, acorn and espree, spend significant time in the Yarr interpreter evaluating non-greedy sub patterns.  That work is tracked in https://bugs.webkit.org/show_bug.cgi?id=180876.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1456801</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2018-09-05 11:25:24 -0700</bug_when>
    <thetext>We now have JIT support for greedy and non-greedy nested sub patterns, and back references including case ignore for 8 bit strings.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>