<?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>15900</bug_id>
          
          <creation_ts>2007-11-08 13:02:36 -0800</creation_ts>
          <short_desc>15% of string-validate-input.js is spent compiling the same regular expression</short_desc>
          <delta_ts>2007-11-08 15:48:41 -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>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>15902</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>15861</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ggaren</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>60659</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-11-08 13:02:36 -0800</bug_when>
    <thetext>15% of string-validate-input.js is spent compiling the same regular expression

I thought that ggaren fixed this with 15861, but it seems not.  Unless I&apos;m somehow missing his change in my git-repo.

I tried moving &quot;pattern&quot; outside of the loop in string-validate-input.js and saw a 15% speed increase.  Looking at the shark sample, we&apos;re still spending all our time compiling the regexp.  Maybe the patch he landed as part of the old bug was just the &quot;first step in the right direction&quot;.  Well, here is a bug to cover the other steps. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60660</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-11-08 13:04:24 -0800</bug_when>
    <thetext>Of course, even moving pattern outside of the loop for our test run, we&apos;re still 38% slower:
    validate-input:    31.8% *slower*   106.4ms +/- 0.6%    140.2ms +/- 1.7%     significant
than spidermonkey is for this test. :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60696</commentid>
    <comment_count>2</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2007-11-08 15:48:41 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 15902 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>