-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1225 from svaarala/autospawn-typedarray-buffer-pr…
…operty Spawn typed array .buffer ArrayBuffer lazily on first access
- Loading branch information
Showing
8 changed files
with
109 additions
and
73 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
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,8 @@ | ||
function test() { | ||
var arr = []; | ||
while (arr.length < 1e5) { | ||
arr.push(function () {}); | ||
} | ||
print(arr.length + ' anonymous functions created'); | ||
} | ||
test(); |
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() { | ||
var arr = []; | ||
var fn; | ||
while (arr.length < 1e4) { | ||
fn = function () {}; | ||
fn.prototype = null; | ||
arr.push(fn); | ||
} | ||
print(arr.length + ' anonymous functions created'); | ||
} | ||
test(); |
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,8 @@ | ||
function test() { | ||
var arr = []; | ||
while (arr.length < 1e5) { | ||
arr.push(Uint8Array.allocPlain(256)); | ||
} | ||
print(arr.length + ' plain buffers created'); | ||
} | ||
test(); |
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,8 @@ | ||
function test() { | ||
var arr = []; | ||
while (arr.length < 1e5) { | ||
arr.push(new Uint8Array(256)); | ||
} | ||
print(arr.length + ' Uint8Arrays created'); | ||
} | ||
test(); |