summaryrefslogtreecommitdiff
path: root/cli/bench
AgeCommit message (Collapse)Author
2023-01-14chore: use rustfmt imports_granularity option (#17421)Divy Srivastava
Closes https://github.com/denoland/deno/issues/2699 Closes https://github.com/denoland/deno/issues/2347 Uses unstable rustfmt features. Since dprint invokes `rustfmt` we do not need to switch the cargo toolchain to nightly. Do we care about formatting stability of our codebase across Rust versions? (I don't)
2023-01-14refactor(bench/http): Use optional chaining instead of `||` fallthrough (#17317)Max Coplan
2023-01-13chore: add `copyright_checker` tool and add the missing copyright (#17285)Yiyu Lin
2023-01-05refactor(cli,core,ext,rt): remove some unnecessary `clone` or `malloc` (#17274)Yiyu Lin
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-17chore: update to Rust 1.66.0 (#17078)linbingquan
2022-12-15Revert "feat(ops): Fast zero copy string arguments (#16777)" (#17063)Bartek Iwańczuk
This reverts commit 9b2b8df927ac23cfa99016a684179f2a3198ba2e. Closes https://github.com/dsherret/ts-morph/issues/1372 Closes https://github.com/denoland/deno/issues/16979
2022-12-09unstable: remove Deno.spawn, Deno.spawnSync, Deno.spawnChild APIs (#16893)Bartek Iwańczuk
This commit removes three unstable Deno APIs: - "Deno.spawn()" - "Deno.spawnSync()" - "Deno.spawnChild()" These APIs were replaced by a unified "Deno.Command" API.
2022-12-02perf: use fast api for io read/write sync (#15863)Divy Srivastava
``` $ 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 ```
2022-12-02feat(ops): Fast zero copy string arguments (#16777)Divy Srivastava
Uses SeqOneByteString optimization to do zero-copy `&str` arguments in fast calls. - [x] Depends on https://github.com/denoland/rusty_v8/pull/1129 - [x] Depends on https://chromium-review.googlesource.com/c/v8/v8/+/4036884 - [x] Disable in async ops - [x] Make it work with owned `String` with an extra alloc in fast path. - [x] Support `Cow<'_, str>`. Owned for slow case, Borrowed for fast case ```rust #[op] fn op_string_len(s: &str) -> u32 { str.len() as u32 } ```
2022-11-18chore: use Rust 1.65.0 (#16688)Aaron O'Mullan
2022-11-15perf(runtime/spawn): collect output using `op_read_all` (#16596)Marcos Casagrande
**This patch** ``` benchmark time (avg) (min … max) p75 p99 p995 ------------------------------------------------- ----------------------------- echo deno 23.99 ms/iter (22.51 ms … 33.61 ms) 23.97 ms 33.61 ms 33.61 ms cat 16kb 24.27 ms/iter (22.5 ms … 35.21 ms) 24.2 ms 35.21 ms 35.21 ms cat 1mb 25.88 ms/iter (25.04 ms … 30.28 ms) 26.12 ms 30.28 ms 30.28 ms cat 15mb 38.41 ms/iter (35.7 ms … 50 ms) 38.31 ms 50 ms 50 ms ``` **main** ``` benchmark time (avg) (min … max) p75 p99 p995 ------------------------------------------------- ----------------------------- echo deno 35.66 ms/iter (34.53 ms … 41.84 ms) 35.79 ms 41.84 ms 41.84 ms cat 16kb 35.99 ms/iter (34.52 ms … 44.94 ms) 36.05 ms 44.94 ms 44.94 ms cat 1mb 38.68 ms/iter (36.67 ms … 50.44 ms) 37.95 ms 50.44 ms 50.44 ms cat 15mb 48.4 ms/iter (46.19 ms … 58.41 ms) 49.16 ms 58.41 ms 58.41 ms ```
2022-10-28Reland "perf(core): generate inlined wrappers for async ops" (#16455)Divy Srivastava
Reland https://github.com/denoland/deno/pull/16428
2022-10-27Revert "perf(core): generate inlined wrappers for async ops (#16428)" (#16443)Divy Srivastava
2022-10-27perf(core): generate inlined wrappers for async ops (#16428)Divy Srivastava
V8's JIT can do a better job knowing the argument count and also enable fast call path (in future). This also lets us call async ops without `opAsync`: ```js const { ops } = Deno.core; await ops.op_void_async(); ``` this patch: 4405286 ops/sec main: 3508771 ops/sec
2022-10-26feat: Stabilize Deno.consoleSize() API (#15933)Bartek Iwańczuk
This commit stabilizes "Deno.consoleSize()" API. There is one change compared to previous unstable API, in that the API doesn't accept any arguments. Console size is established by querying syscalls for stdio streams at fd 0, 1 and 2.
2022-10-17bench: don't send data to grafana (#16324)Bartek Iwańczuk
ci / bench release ubuntu-20.04-xl (pull_request) went from 24m to 23m
2022-10-17bench: run HTTP benches for 10s (#16322)Bartek Iwańczuk
ci / bench release ubuntu-20.04-xl (pull_request) went from 27m to 24m
2022-10-15bench: don't show output (#16288)Bartek Iwańczuk
Benchmarks are extremely noisy and it makes it impossible to inspect what's going on in GitHub action logger.
2022-10-15bench: avoid port collision (#16285)Bartek Iwańczuk
2022-10-10fix(npm): support compiling on linux/aarch64 (#16208)Luke Channings
Changes introduced in #13633 have broken the ability to compile for linux/aarch64 - specifically the use of a `i8` as a char type, which is an `u8` on linux/aarch64. This PR: - Replaces instances of `i8` with the architecture-aware wrapper type `c_char` - Skips the use of `--export-dynamic-symbol` on linux-aarch64, because the target environments often rely on older libc/binutils versions
2022-10-09perf(ext/crypto): optimize `getRandomValues` (#16212)Divy Srivastava
2022-10-07perf(napi): optimize primitive napi functions (#16163)Divy Srivastava
This optimization applies on `napi_get_undefined`, `napi_get_null` & `napi_get_boolean`. ``` # main benchmark time (avg) (min … max) p75 p99 p995 ---------------------------------------------------------- ----------------------------- warmup 482.55 ps/iter (462.5 ps … 15.67 ns) 475 ps 525 ps 829.1 ps napi_get_undefined 25.07 ns/iter (24.03 ns … 36.87 ns) 25.37 ns 27.09 ns 34.85 ns ``` ``` # This patch benchmark time (avg) (min … max) p75 p99 p995 ---------------------------------------------------------- ----------------------------- warmup 484.78 ps/iter (462.5 ps … 14.4 ns) 475 ps 554.1 ps 583.3 ps napi_get_undefined 15.52 ns/iter (15.35 ns … 22.14 ns) 15.41 ns 17.18 ns 20.02 ns ```
2022-10-04perf(ext/fetch): consume body using ops (#16038)Marcos Casagrande
This commit adds a fast path to `Request` and `Response` that make consuming request bodies much faster when using `Body#text`, `Body#arrayBuffer`, and `Body#blob`, if the body is a FastStream. Because the response bodies for `fetch` are FastStream, this speeds up consuming `fetch` response bodies significantly.
2022-09-28feat(ext/flash): add `reuseport` option on Linux (#16022)Divy Srivastava
2022-09-28feat: implement Web Cache API (#15829)Satya Rohith
2022-09-27fix(cli/bench): strace numeric format (#16055)Marcos Casagrande
2022-09-27feat(ext/crypto): add x25519 and Ed25519 CFRG curves (#14119)Divy Srivastava
2022-09-23perf: use fast ops for tty (#15976)Divy Srivastava
2022-09-22perf: fs optimizations - part 1 (#15873)Divy Srivastava
2022-09-22feat(ops): Automatic fast ops creation (#15527)Aapo Alasuutari
2022-09-19refactor: move out test files from root testdata directory into sub ↵David Sherret
directories (#15949)
2022-09-17perf(web): optimize encodeInto() (#15922)Divy Srivastava
2022-09-17perf(ext/console): avoid `wrapConsole` when not inspecting (#15931)Divy Srivastava
2022-09-10perf: optimize URL serialization (#15663)Divy Srivastava
2022-09-06perf(runtime): short-circuit `queue_async_op` for Poll::Ready (#15773)Divy Srivastava
2022-09-05perf(runtime): flatten arguments for write_file ops (#15776)Divy Srivastava
2022-09-04fix(bench): make sure bytes/response is equal (#15763)Divy Srivastava
2022-08-28perf: use fast api for op_now (#15643)Divy Srivastava
2022-08-24feat(ext/flash): split upgradeHttp into two APIs (#15557)Luca Casonato
This commit splits `Deno.upgradeHttp` into two different APIs, because the same API is currently overloaded with two different functions. Flash requests upgrade immediately, with no need to return a `Response` object. Instead you have to manually write the response to the socket. Hyper requests only upgrade once a `Response` object has been sent. These two behaviours are now split into `Deno.upgradeHttp` and `Deno.upgradeHttpRaw`. The latter is flash only. The former only supports hyper requests at the moment, but can be updated to support flash in the future. Additionally this removes `void | Promise<void>` as valid return types for the handler function. If one wants to use `Deno.upgradeHttpRaw`, they will have to type cast the handler signature - the signature is meant for the 99.99%, and should not be complicated for the 0.01% that use `Deno.upgradeHttpRaw()`.
2022-08-24feat: update `Deno.serve` function signature (#15563)Luca Casonato
This commit changes the `Deno.serve` function signature to be more versatile and easier to use. It is now a drop in replacement for std/http's `serve`. The input validation has also been reworked.
2022-08-21feat(ops): V8 Fast Calls (#15291)Divy Srivastava
2022-08-19feat(unstable): change Deno.serve() API (#15498)Bartek Iwańczuk
- Merge "Deno.serve()" and "Deno.serveTls()" API - Remove first argument and use "fetch" field options instead - Update type declarations - Add more documentation
2022-08-19chore(bench): add flash router benchmarks (#15495)Divy Srivastava
2022-08-19perf(runtime): optimize Deno.file open & stream (#15496)Divy Srivastava
2022-08-19fix(ext/flash): concurrent response streams (#15493)Divy Srivastava
2022-08-18feat(ext/flash): An optimized http/1.1 server (#15405)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl> Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-08-11perf(ops): Monomorphic sync op calls (#15337)Aapo Alasuutari
Welcome to better optimised op calls! Currently opSync is called with parameters of every type and count. This most definitely makes the call megamorphic. Additionally, it seems that spread params leads to V8 not being able to optimise the calls quite as well (apparently Fast Calls cannot be used with spread params). Monomorphising op calls should lead to some improved performance. Now that unwrapping of sync ops results is done on Rust side, this is pretty simple: ``` opSync("op_foo", param1, param2); // -> turns to ops.op_foo(param1, param2); ``` This means sync op calls are now just directly calling the native binding function. When V8 Fast API Calls are enabled, this will enable those to be called on the optimised path. Monomorphising async ops likely requires using callbacks and is left as an exercise to the reader.
2022-07-22Revert "feat(ops): V8 Fast Calls (#15122)" (#15276)Divy Srivastava
This reverts commit 03dc3b8972f460e40d0b75fc3207cae9fe4f60da.
2022-07-22feat(ops): V8 Fast Calls (#15122)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>