JavaScript Tests - update statistics handling in test, bug 311414 by jorendorff
authorBob Clary <bclary@bclary.com>
Wed, 25 Jun 2008 10:31:55 -0400
changeset 15528 0817b336d9c6e8909b5bc953c73caabe3eb611f9
parent 15527 57f12ae323d0f6af05fda39b7b38183d5bd3c815
child 15529 ec02b60c2a0b19f021ab1e67facefcea436b3ba4
push id288
push userbclary@mozilla.com
push dateWed, 25 Jun 2008 14:34:51 +0000
treeherdermozilla-central@0817b336d9c6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs311414
milestone1.9.1a1pre
JavaScript Tests - update statistics handling in test, bug 311414 by jorendorff
js/tests/ecma_3/RegExp/regress-311414.js
--- a/js/tests/ecma_3/RegExp/regress-311414.js
+++ b/js/tests/ecma_3/RegExp/regress-311414.js
@@ -42,38 +42,38 @@ var summary = 'RegExp captured tail matc
 var actual = '';
 var expect = '';
 
 printBugNumber(BUGNUMBER);
 printStatus (summary);
  
 function q1(n) {
   var c = [];
-  c[Math.pow(10, n)] = 1;
+  c[n] = 1;
   c = c.join(" ");
   var d = Date.now();
   var e = c.match(/(.*)foo$/);
   var f = Date.now();
   return (f - d);
 }
 
 function q2(n) {
   var c = [];
-  c[Math.pow(10, n)] = 1;
+  c[n] = 1;
   c = c.join(" ");
   var d = Date.now();
   var e = /foo$/.test(c) && c.match(/(.*)foo$/);
   var f = Date.now();
   return (f - d);
 }
 
 var data1 = {X:[], Y:[]};
 var data2 = {X:[], Y:[]};
 
-for (var x = 0; x < 5; x++)
+for (var x = 500; x < 5000; x += 500)
 {
   var y1 = q1(x);
   var y2 = q2(x);
   data1.X.push(x);
   data1.Y.push(y1);
   data2.X.push(x);
   data2.Y.push(y2);
   gc();