-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ffi_doc_update
- Loading branch information
Showing
350 changed files
with
30,775 additions
and
15,821 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
command script import vendor/zig/tools/lldb_pretty_printers.py | ||
# command script import vendor/zig/tools/lldb_pretty_printers.py | ||
command script import vendor/WebKit/Tools/lldb/lldb_webkit.py | ||
|
||
# type summary add --summary-string "${var} | inner=${var[0-30]}, source=${var[33-64]}, tag=${var[31-32]}" "unsigned long" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
1.1.41 | ||
1.1.42 |
Binary file not shown.
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,27 @@ | ||
import { Buffer } from "node:buffer"; | ||
import { bench, run } from "../runner.mjs"; | ||
|
||
const variations = [ | ||
["latin1", "hello world"], | ||
["utf16", "hello emoji 🤔"], | ||
]; | ||
|
||
for (const [label, string] of variations) { | ||
const big = Buffer.alloc(1000000, string).toString(); | ||
const small = Buffer.from(string).toString(); | ||
const substring = big.slice(0, big.length - 2); | ||
|
||
bench(`${substring.length}`, () => { | ||
return Buffer.byteLength(substring, "utf8"); | ||
}); | ||
|
||
bench(`${small.length}`, () => { | ||
return Buffer.byteLength(small); | ||
}); | ||
|
||
bench(`${big.length}`, () => { | ||
return Buffer.byteLength(big); | ||
}); | ||
} | ||
|
||
await run(); |
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,37 @@ | ||
import { bench, run } from "../runner.mjs"; | ||
import { brotliCompress, brotliDecompress, createBrotliCompress, createBrotliDecompress } from "node:zlib"; | ||
import { promisify } from "node:util"; | ||
import { pipeline } from "node:stream/promises"; | ||
import { Readable } from "node:stream"; | ||
import { readFileSync } from "node:fs"; | ||
|
||
const brotliCompressAsync = promisify(brotliCompress); | ||
const brotliDecompressAsync = promisify(brotliDecompress); | ||
|
||
const testData = | ||
process.argv.length > 2 | ||
? readFileSync(process.argv[2]) | ||
: Buffer.alloc(1024 * 1024 * 16, "abcdefghijklmnopqrstuvwxyz"); | ||
let compressed; | ||
|
||
bench("brotli compress", async () => { | ||
compressed = await brotliCompressAsync(testData); | ||
}); | ||
|
||
bench("brotli decompress", async () => { | ||
await brotliDecompressAsync(compressed); | ||
}); | ||
|
||
bench("brotli compress stream", async () => { | ||
const source = Readable.from([testData]); | ||
const compress = createBrotliCompress(); | ||
await pipeline(source, compress); | ||
}); | ||
|
||
bench("brotli decompress stream", async () => { | ||
const source = Readable.from([compressed]); | ||
const decompress = createBrotliDecompress(); | ||
await pipeline(source, decompress); | ||
}); | ||
|
||
await run(); |
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
Oops, something went wrong.