OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 15 matching lines...) Expand all Loading... |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 // Automatically generated on 2009-01-30. Manually updated on 2010-09-17. | 28 // Automatically generated on 2009-01-30. Manually updated on 2010-09-17. |
29 | 29 |
30 // This benchmark is generated by loading 50 of the most popular pages | 30 // This benchmark is generated by loading 50 of the most popular pages |
31 // on the web and logging all regexp operations performed. Each | 31 // on the web and logging all regexp operations performed. Each |
32 // operation is given a weight that is calculated from an estimate of | 32 // operation is given a weight that is calculated from an estimate of |
33 // the popularity of the pages where it occurs and the number of times | 33 // the popularity of the pages where it occurs and the number of times |
34 // it is executed while loading each page. Furthermore the literal | 34 // it is executed while loading each page. Furthermore the literal |
35 // letters in the data are encoded using ROT13 in a way that does not | 35 // letters in the data are encoded using ROT13 in a way that does not |
36 // affect how the regexps match their input. Finally the strings are | 36 // affect how the regexps match their input. Finally the strings are |
37 // scrambled to exercise the regexp engine on different input strings. | 37 // scrambled to exercise the regexp engine on different input strings. |
38 | 38 |
39 | 39 |
40 var RegExp = new BenchmarkSuite('RegExp', 910985, [ | 40 var RegExp = new BenchmarkSuite('RegExp', 910985, [ |
41 new Benchmark("RegExp", RegExpRun, RegExpSetup, RegExpTearDown) | 41 new Benchmark("RegExp", RegExpRun, RegExpSetup, RegExpTearDown) |
42 ]); | 42 ]); |
43 | 43 |
44 var regExpBenchmark = null; | 44 var regExpBenchmark = null; |
45 | 45 |
46 function RegExpSetup() { | 46 function RegExpSetup() { |
47 regExpBenchmark = new RegExpBenchmark(); | 47 regExpBenchmark = new RegExpBenchmark(); |
48 RegExpRun(); // run once to get system initialized | 48 RegExpRun(); // run once to get system initialized |
49 } | 49 } |
50 | 50 |
51 function RegExpRun() { | 51 function RegExpRun() { |
52 regExpBenchmark.run(); | 52 regExpBenchmark.run(); |
53 } | 53 } |
54 | 54 |
55 function RegExpTearDown() { | 55 function RegExpTearDown() { |
56 regExpBenchmark = null; | 56 regExpBenchmark = null; |
57 } | 57 } |
58 | 58 |
59 // Returns an array of n different variants of the input string str. | 59 // Returns an array of n different variants of the input string str. |
60 // The variants are computed by randomly rotating one random | 60 // The variants are computed by randomly rotating one random |
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1752 runBlock4(); | 1752 runBlock4(); |
1753 runBlock5(); | 1753 runBlock5(); |
1754 runBlock6(); | 1754 runBlock6(); |
1755 runBlock7(); | 1755 runBlock7(); |
1756 runBlock8(); | 1756 runBlock8(); |
1757 runBlock9(); | 1757 runBlock9(); |
1758 runBlock10(); | 1758 runBlock10(); |
1759 runBlock11(); | 1759 runBlock11(); |
1760 } | 1760 } |
1761 } | 1761 } |
1762 | 1762 |
1763 this.run = run; | 1763 this.run = run; |
1764 } | 1764 } |
OLD | NEW |