OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 17 matching lines...) Expand all Loading... |
28 // Automatically generated on 2009-01-30. | 28 // Automatically generated on 2009-01-30. |
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. Finally the literal | 34 // it is executed while loading each page. Finally 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. | 36 // affect how the regexps match their input. |
37 | 37 |
38 var RegRxp = new BenchmarkSuite('RegExp', 601250, [ | 38 var RegRxp = new BenchmarkSuite('RegExp', 910985, [ |
39 new Benchmark("RegExp", runRegExpBenchmark) | 39 new Benchmark("RegExp", runRegExpBenchmark) |
40 ]); | 40 ]); |
41 | 41 |
42 function runRegExpBenchmark() { | 42 function runRegExpBenchmark() { |
43 var re0 = /^ba/; | 43 var re0 = /^ba/; |
44 var re1 = /(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/; | 44 var re1 = /(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/; |
45 var re2 = /^\s*|\s*$/g; | 45 var re2 = /^\s*|\s*$/g; |
46 var re3 = /\bQBZPbageby_cynprubyqre\b/; | 46 var re3 = /\bQBZPbageby_cynprubyqre\b/; |
47 var re4 = /,/; | 47 var re4 = /,/; |
48 var re5 = /\bQBZPbageby_cynprubyqre\b/g; | 48 var re5 = /\bQBZPbageby_cynprubyqre\b/g; |
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 runBlock4(); | 1605 runBlock4(); |
1606 runBlock5(); | 1606 runBlock5(); |
1607 runBlock6(); | 1607 runBlock6(); |
1608 runBlock7(); | 1608 runBlock7(); |
1609 runBlock8(); | 1609 runBlock8(); |
1610 runBlock9(); | 1610 runBlock9(); |
1611 runBlock10(); | 1611 runBlock10(); |
1612 runBlock11(); | 1612 runBlock11(); |
1613 } | 1613 } |
1614 } | 1614 } |
OLD | NEW |