From 6982c74e11ec8294ed5bd53d2a9d316d7e20e7d2 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Thu, 1 Dec 2022 22:05:18 -0800 Subject: perf: use fast api for io read/write sync (#15863) ``` $ dd if=/dev/zero bs=65536 count=500000 | ./stdio # C baseline 500000+0 records in 500000+0 records out 32768000000 bytes transferred in 4.126087 secs (7941664827 bytes/sec) c: size 32768000000 reads 500000 blocksize 65536 ``` ``` $ dd if=/dev/zero bs=65536 count=500000 | deno run stdio.js # Deno 500000+0 records in 500000+0 records out 32768000000 bytes transferred in 4.279032 secs (7657806719 bytes/sec) deno: size 32768000000 reads 500000 blocksize 65536 ``` --- cli/bench/stdio/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 cli/bench/stdio/README.md (limited to 'cli/bench/stdio/README.md') diff --git a/cli/bench/stdio/README.md b/cli/bench/stdio/README.md new file mode 100644 index 000000000..b2d4875ac --- /dev/null +++ b/cli/bench/stdio/README.md @@ -0,0 +1,9 @@ +## `stdio` benchmarks + +Compile the C baseline and run the benchmark: + +```bash +cc stdio.c -o stdio -O3 +time dd if=/dev/zero bs=65536 count=500000 | ./stdio +time dd if=/dev/zero bs=65536 count=500000 | deno run stdio.js +``` -- cgit v1.2.3