Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6083e7a

Browse filesBrowse files
targosItalo A. Casas
authored andcommitted
benchmark: avoid TurboFan deopt in arrays bench
Something unidentified at the moment is causing the arrays benchmarks to deopt when run with the TurboFan compiler. Refactor the test to use an inner function that can be correctly optimized by TurboFan and Crankshaft. PR-URL: #11894 Ref: #11851 (comment) Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent cf1117b commit 6083e7a
Copy full SHA for 6083e7a

File tree

Expand file treeCollapse file tree

3 files changed

+15
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+15
-3
lines changed
Open diff view settings
Collapse file

‎benchmark/arrays/var-int.js‎

Copy file name to clipboardExpand all lines: benchmark/arrays/var-int.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ function main(conf) {
2727
bench.start();
2828
var arr = new clazz(n * 1e6);
2929
for (var i = 0; i < 10; ++i) {
30+
run();
31+
}
32+
bench.end(n);
33+
34+
function run() {
3035
for (var j = 0, k = arr.length; j < k; ++j) {
3136
arr[j] = (j ^ k) & 127;
3237
}
3338
}
34-
bench.end(n);
3539
}
Collapse file

‎benchmark/arrays/zero-float.js‎

Copy file name to clipboardExpand all lines: benchmark/arrays/zero-float.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ function main(conf) {
2727
bench.start();
2828
var arr = new clazz(n * 1e6);
2929
for (var i = 0; i < 10; ++i) {
30+
run();
31+
}
32+
bench.end(n);
33+
34+
function run() {
3035
for (var j = 0, k = arr.length; j < k; ++j) {
3136
arr[j] = 0.0;
3237
}
3338
}
34-
bench.end(n);
3539
}
Collapse file

‎benchmark/arrays/zero-int.js‎

Copy file name to clipboardExpand all lines: benchmark/arrays/zero-int.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ function main(conf) {
2727
bench.start();
2828
var arr = new clazz(n * 1e6);
2929
for (var i = 0; i < 10; ++i) {
30+
run();
31+
}
32+
bench.end(n);
33+
34+
function run() {
3035
for (var j = 0, k = arr.length; j < k; ++j) {
3136
arr[j] = 0;
3237
}
3338
}
34-
bench.end(n);
3539
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.