Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: test/js-perf-test/RegExp/base_test.js

Issue 2521263003: [js-perf-test] Add RegExp microbenchmarks (Closed)
Patch Set: Move to own test suite Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 ];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698