OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 load("base.js"); |
| 6 |
| 7 var str; |
| 8 var re; |
| 9 |
| 10 function SimpleTest() { |
| 11 re.test(str); |
| 12 } |
| 13 |
| 14 function Test1Setup() { |
| 15 re = /[Cz]/; |
| 16 str = createHaystack(); |
| 17 } |
| 18 |
| 19 function Test2Setup() { |
| 20 re = /[cZ]/; // Not found. |
| 21 str = createHaystack(); |
| 22 } |
| 23 |
| 24 var benchmarks = [ [SimpleTest, Test1Setup], |
| 25 [SimpleTest, Test2Setup], |
| 26 ]; |
OLD | NEW |