diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-03-16 12:58:38 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 12:58:38 +0530 |
commit | 697b60a335cad20f73e568c47d17564a6bd3fab7 (patch) | |
tree | 0f14ae5898de2f55cc15aa760de9e566915b3219 /cli | |
parent | 395f527238f31d312b91955a66bc25bc0a6d11fb (diff) |
perf(web): use DOMString for BlobParts (#13979)
Diffstat (limited to 'cli')
-rw-r--r-- | cli/bench/deno_common.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/bench/deno_common.js b/cli/bench/deno_common.js index 71195b32e..629ed7669 100644 --- a/cli/bench/deno_common.js +++ b/cli/bench/deno_common.js @@ -56,6 +56,13 @@ function benchUrlParse() { }); } +function benchLargeBlobText() { + const input = "long-string".repeat(999_999); + benchSync("blob_text_large", 3, () => { + new Blob([input]).text(); + }); +} + function benchDateNow() { benchSync("date_now", 5e5, () => { Date.now(); @@ -123,6 +130,7 @@ async function main() { // A common "language feature", that should be fast // also a decent representation of a non-trivial JSON-op benchUrlParse(); + benchLargeBlobText(); benchB64RtLong(); benchB64RtShort(); // IO ops |