Commit 74c341be authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[js-perf-test] Add micro-benchmark with constant regexps

Bug: v8:7779
Change-Id: Iabe5b74900885d489309fdfe25674a29e8690965
Reviewed-on: https://chromium-review.googlesource.com/1068745
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53281}
parent 27ad0c84
......@@ -55,7 +55,8 @@
{"name": "SlowReplace"},
{"name": "SlowSearch"},
{"name": "SlowSplit"},
{"name": "SlowTest"}
{"name": "SlowTest"},
{"name": "InlineTest"}
]
}
]
......
......@@ -54,7 +54,8 @@
{"name": "SlowReplace"},
{"name": "SlowSearch"},
{"name": "SlowSplit"},
{"name": "SlowTest"}
{"name": "SlowTest"},
{"name": "InlineTest"}
]
}
]
......
......@@ -20,6 +20,7 @@ load('slow_replace.js');
load('slow_search.js');
load('slow_split.js');
load('slow_test.js');
load('test_inl.js')
var success = true;
......
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function ConstTest() {
/[Cz]/.test("abCdefgzabCdefgzabCdefgzabCdefgzabCdefgzabCdefgzabCdefgzabCdefgz");
}
const cre = /[Cz]/;
function GlobalConstTest() {
cre.test("abCdefgzabCdefgzabCdefgzabCdefgzabCdefgzabCdefgzabCdefgzabCdefgz");
}
var benchmarks = [ [ConstTest, () => {}],
[GlobalConstTest, () => {}],
];
createBenchmarkSuite("InlineTest");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment