forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
995 changed files
with
15,776 additions
and
19,540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
for (var i = 0; i < 1e5; ++i) { | ||
[ | ||
0n,1n,2n,3n,4n,5n,6n,7n,8n,9n,10n,11n,12n,13n,14n,15n, | ||
31n,30n,29n,28n,27n,26n,25n,24n,23n,22n,21n,20n,19n, | ||
18n,17n,16n,32n,33n,34n,35n,36n,37n,38n,39n,40n,41n, | ||
42n,43n,44n,45n,46n,47n,63n,62n,61n,60n,59n,58n,57n, | ||
56n,55n,54n,53n,52n,51n,50n,49n, | ||
].includes(38n); | ||
} |
21 changes: 21 additions & 0 deletions
21
JSTests/microbenchmarks/array-prototype-includes-contiguous.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const search = { value: 36 }; | ||
const array = [ | ||
{ value: 0 }, { value: 1 }, { value: 2 }, { value: 3 }, { value: 4 }, | ||
{ value: 5 }, { value: 6 }, { value: 7 }, { value: 8 }, { value: 9 }, | ||
{ value: 10 }, { value: 11 }, { value: 12 }, { value: 13 }, { value: 14 }, | ||
{ value: 15 }, { value: 31 }, { value: 30 }, { value: 29 }, { value: 28 }, | ||
{ value: 27 }, { value: 26 }, { value: 25 }, { value: 24 }, { value: 23 }, | ||
{ value: 22 }, { value: 21 }, { value: 20 }, { value: 19 }, { value: 18 }, | ||
{ value: 17 }, { value: 16 }, { value: 32 }, { value: 33 }, { value: 34 }, | ||
{ value: 35 }, search, { value: 37 }, { value: 38 }, { value: 39 }, | ||
{ value: 40 }, { value: 41 }, { value: 42 }, { value: 43 }, { value: 44 }, | ||
{ value: 45 }, { value: 46 }, { value: 47 }, { value: 63 }, { value: 62 }, | ||
{ value: 61 }, { value: 60 }, { value: 59 }, { value: 58 }, { value: 57 }, | ||
{ value: 56 }, { value: 55 }, { value: 54 }, { value: 53 }, { value: 52 }, | ||
{ value: 51 }, { value: 50 }, { value: 49 }, | ||
]; | ||
|
||
for (var i = 0; i < 1e6; ++i) { | ||
array.includes(search); | ||
} | ||
|
20 changes: 20 additions & 0 deletions
20
JSTests/microbenchmarks/array-prototype-includes-double-from-contiguous.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const array = [ | ||
{ value: 0 }, { value: 1 }, { value: 2 }, { value: 3 }, { value: 4 }, | ||
{ value: 5 }, { value: 6 }, { value: 7 }, { value: 8 }, { value: 9 }, | ||
{ value: 10 }, { value: 11 }, { value: 12 }, { value: 13 }, { value: 14 }, | ||
{ value: 15 }, { value: 31 }, { value: 30 }, { value: 29 }, { value: 28 }, | ||
{ value: 27 }, { value: 26 }, { value: 25 }, { value: 24 }, { value: 23 }, | ||
{ value: 22 }, { value: 21 }, { value: 20 }, { value: 19 }, { value: 18 }, | ||
{ value: 17 }, { value: 16 }, { value: 32 }, { value: 33 }, { value: 34 }, | ||
{ value: 35 }, 3.6, { value: 37 }, { value: 38 }, { value: 39 }, | ||
{ value: 40 }, { value: 41 }, { value: 42 }, { value: 43 }, { value: 44 }, | ||
{ value: 45 }, { value: 46 }, { value: 47 }, { value: 63 }, { value: 62 }, | ||
{ value: 61 }, { value: 60 }, { value: 59 }, { value: 58 }, { value: 57 }, | ||
{ value: 56 }, { value: 55 }, { value: 54 }, { value: 53 }, { value: 52 }, | ||
{ value: 51 }, { value: 50 }, { value: 49 }, | ||
]; | ||
|
||
for (var i = 0; i < 1e6; ++i) { | ||
array.includes(3.6); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
for (var i = 0; i < 1e6; ++i) { | ||
[ | ||
0.2, 1.2, 2.2, 3.2, 4.2, 5.2, 6.2, 7.2, 8.2, 9.2, 10.2, 11.2, 12.2, 13.2, 14.2, 15.2, | ||
31.2, 30.2, 29.2, 28.2, 27.2, 26.2, 25.2, 24.2, 23.2, 22.2, 21.2, 20.2, 19.2, 18.2, | ||
17.2, 16.2, 32.2, 33.2, 34.2, 35.2, 36.2, 37.2, 38.2, 39.2, 40.2, 41.2, 42.2, 43.2, | ||
44.2, 45.2, 46.2, 47.2, 63.2, 62.2, 61.2, 60.2, 59.2, 58.2, 57.2, 56.2, 55.2, 54.2, | ||
53.2, 52.2, 51.2, 50.2, 49.2, | ||
].includes(38.2); | ||
} |
20 changes: 20 additions & 0 deletions
20
JSTests/microbenchmarks/array-prototype-includes-int32-from-contiguous.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const array = [ | ||
{ value: 0 }, { value: 1 }, { value: 2 }, { value: 3 }, { value: 4 }, | ||
{ value: 5 }, { value: 6 }, { value: 7 }, { value: 8 }, { value: 9 }, | ||
{ value: 10 }, { value: 11 }, { value: 12 }, { value: 13 }, { value: 14 }, | ||
{ value: 15 }, { value: 31 }, { value: 30 }, { value: 29 }, { value: 28 }, | ||
{ value: 27 }, { value: 26 }, { value: 25 }, { value: 24 }, { value: 23 }, | ||
{ value: 22 }, { value: 21 }, { value: 20 }, { value: 19 }, { value: 18 }, | ||
{ value: 17 }, { value: 16 }, { value: 32 }, { value: 33 }, { value: 34 }, | ||
{ value: 35 }, 3, { value: 37 }, { value: 38 }, { value: 39 }, | ||
{ value: 40 }, { value: 41 }, { value: 42 }, { value: 43 }, { value: 44 }, | ||
{ value: 45 }, { value: 46 }, { value: 47 }, { value: 63 }, { value: 62 }, | ||
{ value: 61 }, { value: 60 }, { value: 59 }, { value: 58 }, { value: 57 }, | ||
{ value: 56 }, { value: 55 }, { value: 54 }, { value: 53 }, { value: 52 }, | ||
{ value: 51 }, { value: 50 }, { value: 49 }, | ||
]; | ||
|
||
for (var i = 0; i < 1e6; ++i) { | ||
array.includes(3); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function test(array, searchElement) { | ||
return array.includes(searchElement); | ||
} | ||
noInline(test); | ||
|
||
var array = new Array(1024); | ||
for (var i = 0; i < array.length; i++) | ||
array[i] = i; | ||
|
||
for (var i = 0; i < 1e6; ++i) | ||
test(array, 512); |
36 changes: 36 additions & 0 deletions
36
JSTests/microbenchmarks/array-prototype-includes-string-16-const.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
function test(array, value) { | ||
return array.includes(value); | ||
} | ||
noInline(test); | ||
|
||
const array = [ | ||
"あいうえおかきくけこさしすせそたちつてとなにぬねの", | ||
"かきくけこさしすせそたちつてとなにぬねのはひふへほ", | ||
"さしすせそたちつてとなにぬねのはひふへほまみむめも", | ||
"たちつてとなにぬねのはひふへほまみむめもやゆよらり", | ||
"なにぬねのはひふへほまみむめもやゆよらりるれろわを", | ||
"はひふへほまみむめもやゆよらりるれろわをんあいうえ", | ||
"まみむめもやゆよらりるれろわをんあいうえおかきくけ", | ||
"やゆよらりるれろわをんあいうえおかきくけこさしすせ", | ||
"らりるれろわをんあいうえおかきくけこさしすせそたち", | ||
"わをんあいうえおかきくけこさしすせそたちつてとなに", | ||
"んあいうえおかきくけこさしすせそたちつてとなにぬね", | ||
"ひふへほまみむめもやゆよらりるれろわをんあいうえお", | ||
"ふへほまみむめもやゆよらりるれろわをんあいうえおか", | ||
"へほまみむめもやゆよらりるれろわをんあいうえおかき", | ||
"ほまみむめもやゆよらりるれろわをんあいうえおかきく", | ||
"みむめもやゆよらりるれろわをんあいうえおかきくけこ", | ||
"むめもやゆよらりるれろわをんあいうえおかきくけこさ", | ||
"めもやゆよらりるれろわをんあいうえおかきくけこさし", | ||
"もやゆよらりるれろわをんあいうえおかきくけこさしす", | ||
"ゆよらりるれろわをんあいうえおかきくけこさしすせそ", | ||
"よらりるれろわをんあいうえおかきくけこさしすせそた", | ||
"らりるれろわをんあいうえおかきくけこさしすせそたち", | ||
"りるれろわをんあいうえおかきくけこさしすせそたちつ", | ||
"るれろわをんあいうえおかきくけこさしすせそたちつて", | ||
"れろわをんあいうえおかきくけこさしすせそたちつてと", | ||
"ろわをんあいうえおかきくけこさしすせそたちつてとな", | ||
]; | ||
|
||
for (var i = 0; i < 1e6; ++i) | ||
test(array, "もやゆよらりるれろわをんあいうえおかきくけこさしす"); |
36 changes: 36 additions & 0 deletions
36
JSTests/microbenchmarks/array-prototype-includes-string-16.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
function test(array, value) { | ||
return array.includes(value); | ||
} | ||
noInline(test); | ||
|
||
const array = [ | ||
"あいうえおかきくけこさしすせそたちつてとなにぬねの", | ||
"かきくけこさしすせそたちつてとなにぬねのはひふへほ", | ||
"さしすせそたちつてとなにぬねのはひふへほまみむめも", | ||
"たちつてとなにぬねのはひふへほまみむめもやゆよらり", | ||
"なにぬねのはひふへほまみむめもやゆよらりるれろわを", | ||
"はひふへほまみむめもやゆよらりるれろわをんあいうえ", | ||
"まみむめもやゆよらりるれろわをんあいうえおかきくけ", | ||
"やゆよらりるれろわをんあいうえおかきくけこさしすせ", | ||
"らりるれろわをんあいうえおかきくけこさしすせそたち", | ||
"わをんあいうえおかきくけこさしすせそたちつてとなに", | ||
"んあいうえおかきくけこさしすせそたちつてとなにぬね", | ||
"ひふへほまみむめもやゆよらりるれろわをんあいうえお", | ||
"ふへほまみむめもやゆよらりるれろわをんあいうえおか", | ||
"へほまみむめもやゆよらりるれろわをんあいうえおかき", | ||
"ほまみむめもやゆよらりるれろわをんあいうえおかきく", | ||
"みむめもやゆよらりるれろわをんあいうえおかきくけこ", | ||
"むめもやゆよらりるれろわをんあいうえおかきくけこさ", | ||
"めもやゆよらりるれろわをんあいうえおかきくけこさし", | ||
"もやゆよらりるれろわをんあいうえおかきくけこさしす", | ||
"ゆよらりるれろわをんあいうえおかきくけこさしすせそ", | ||
"よらりるれろわをんあいうえおかきくけこさしすせそた", | ||
"らりるれろわをんあいうえおかきくけこさしすせそたち", | ||
"りるれろわをんあいうえおかきくけこさしすせそたちつ", | ||
"るれろわをんあいうえおかきくけこさしすせそたちつて", | ||
"れろわをんあいうえおかきくけこさしすせそたちつてと", | ||
"ろわをんあいうえおかきくけこさしすせそたちつてとな", | ||
]; | ||
|
||
for (var i = 0; i < 1e6; ++i) | ||
test(array, "もやゆよらりるれろわをん" + "あいうえおかきくけこさしす"); |
35 changes: 35 additions & 0 deletions
35
JSTests/microbenchmarks/array-prototype-includes-string-const.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
function test(array, index) { | ||
return array.includes(index); | ||
} | ||
noInline(test); | ||
|
||
const array = [ | ||
"dEXt0TxZQQQasd999!@#$%d^&", | ||
"AAZZ!!@@**CC77zzxx1122d33", | ||
"HelloWorldHeldloWorlddABC", | ||
"abcABC123!@#xfyzXYZ!$d%+=", | ||
"Zyx9!Zyx9!Zyx9!Zyx9!!d???", | ||
"LoremIpsum1234!@#$LordemI", | ||
"QQQQQQQQQQqqqqqqqqqq-----", | ||
"&&&&1111%%%%2222@@@@33f33", | ||
"TestStringasdVariousChars", | ||
"RandomASCII~d~~~====?????", | ||
"^^^^#####^^^f^^+++++.....", | ||
"AZaz09!?AZaz09!?AZaz09!?%", | ||
"Foobar##1122Foobar##1122F", | ||
"9876543210!@d#$%^&*()_+=-", | ||
"OneTwo3FourFive6Seven8Nin", | ||
"Zwxy000111Zwxy000111Zwxy0", | ||
"Spark!!!Spark???Spark%%%S", | ||
"ShortAndSweet123??!!Short", | ||
"BenchmarkCaseHere12345!!?", | ||
"MultiLineString###000xxx@", | ||
"ABCDEFGHabcdfefgh1234!!!!", | ||
"111122223333d4444!!!!####", | ||
"EndlessVariety?!@#$%^^^^^", | ||
"PqrstUVWX9876pqrstUVWX987", | ||
"MixItUpWith5omeWe!rdCHARS", | ||
"FinallyZzYyXx!@#$4321)(*&", | ||
]; | ||
for (var i = 0; i < 1e6; ++i) | ||
test(array, "BenchmarkCaseHere12345!!?"); |
35 changes: 35 additions & 0 deletions
35
JSTests/microbenchmarks/array-prototype-includes-string.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
function test(array, index) { | ||
return array.includes(index); | ||
} | ||
noInline(test); | ||
|
||
const array = [ | ||
"dEXt0TxZQQQasd999!@#$%d^&", | ||
"AAZZ!!@@**CC77zzxx1122d33", | ||
"HelloWorldHeldloWorlddABC", | ||
"abcABC123!@#xfyzXYZ!$d%+=", | ||
"Zyx9!Zyx9!Zyx9!Zyx9!!d???", | ||
"LoremIpsum1234!@#$LordemI", | ||
"QQQQQQQQQQqqqqqqqqqq-----", | ||
"&&&&1111%%%%2222@@@@33f33", | ||
"TestStringasdVariousChars", | ||
"RandomASCII~d~~~====?????", | ||
"^^^^#####^^^f^^+++++.....", | ||
"AZaz09!?AZaz09!?AZaz09!?%", | ||
"Foobar##1122Foobar##1122F", | ||
"9876543210!@d#$%^&*()_+=-", | ||
"OneTwo3FourFive6Seven8Nin", | ||
"Zwxy000111Zwxy000111Zwxy0", | ||
"Spark!!!Spark???Spark%%%S", | ||
"ShortAndSweet123??!!Short", | ||
"BenchmarkCaseHere12345!!?", | ||
"MultiLineString###000xxx@", | ||
"ABCDEFGHabcdfefgh1234!!!!", | ||
"111122223333d4444!!!!####", | ||
"EndlessVariety?!@#$%^^^^^", | ||
"PqrstUVWX9876pqrstUVWX987", | ||
"MixItUpWith5omeWe!rdCHARS", | ||
"FinallyZzYyXx!@#$4321)(*&", | ||
]; | ||
for (var i = 0; i < 1e6; ++i) | ||
test(array, "Benchmark" + "CaseHere12345!!?"); |
19 changes: 19 additions & 0 deletions
19
JSTests/microbenchmarks/array-prototype-indexOf-int32-from-contiguous.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const array = [ | ||
{ value: 0 }, { value: 1 }, { value: 2 }, { value: 3 }, { value: 4 }, | ||
{ value: 5 }, { value: 6 }, { value: 7 }, { value: 8 }, { value: 9 }, | ||
{ value: 10 }, { value: 11 }, { value: 12 }, { value: 13 }, { value: 14 }, | ||
{ value: 15 }, { value: 31 }, { value: 30 }, { value: 29 }, { value: 28 }, | ||
{ value: 27 }, { value: 26 }, { value: 25 }, { value: 24 }, { value: 23 }, | ||
{ value: 22 }, { value: 21 }, { value: 20 }, { value: 19 }, { value: 18 }, | ||
{ value: 17 }, { value: 16 }, { value: 32 }, { value: 33 }, { value: 34 }, | ||
{ value: 35 }, 3, { value: 37 }, { value: 38 }, { value: 39 }, | ||
{ value: 40 }, { value: 41 }, { value: 42 }, { value: 43 }, { value: 44 }, | ||
{ value: 45 }, { value: 46 }, { value: 47 }, { value: 63 }, { value: 62 }, | ||
{ value: 61 }, { value: 60 }, { value: 59 }, { value: 58 }, { value: 57 }, | ||
{ value: 56 }, { value: 55 }, { value: 54 }, { value: 53 }, { value: 52 }, | ||
{ value: 51 }, { value: 50 }, { value: 49 }, | ||
]; | ||
|
||
for (var i = 0; i < 1e6; ++i) { | ||
array.indexOf(3); | ||
} |
Oops, something went wrong.