mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
e136bd86b3
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 ```
191 lines
4.4 KiB
TOML
191 lines
4.4 KiB
TOML
# Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
|
|
|
[workspace]
|
|
resolver = "2"
|
|
members = [
|
|
"bench_util",
|
|
"cli",
|
|
"cli/napi_sym",
|
|
"core",
|
|
"ops",
|
|
"runtime",
|
|
"serde_v8",
|
|
"test_ffi",
|
|
"test_napi",
|
|
"test_util",
|
|
"ext/broadcast_channel",
|
|
"ext/cache",
|
|
"ext/console",
|
|
"ext/crypto",
|
|
"ext/fetch",
|
|
"ext/flash",
|
|
"ext/ffi",
|
|
"ext/http",
|
|
"ext/net",
|
|
"ext/node",
|
|
"ext/url",
|
|
"ext/web",
|
|
"ext/webgpu",
|
|
"ext/webidl",
|
|
"ext/websocket",
|
|
"ext/webstorage",
|
|
"ext/napi",
|
|
]
|
|
exclude = ["test_util/std/hash/_wasm"]
|
|
|
|
# NB: the `bench` and `release` profiles must remain EXACTLY the same.
|
|
[profile.release]
|
|
codegen-units = 1
|
|
incremental = true
|
|
lto = true
|
|
opt-level = 'z' # Optimize for size
|
|
|
|
# NB: the `bench` and `release` profiles must remain EXACTLY the same.
|
|
[profile.bench]
|
|
codegen-units = 1
|
|
incremental = true
|
|
lto = true
|
|
opt-level = 'z' # Optimize for size
|
|
|
|
# Key generation is too slow on `debug`
|
|
[profile.dev.package.num-bigint-dig]
|
|
opt-level = 3
|
|
|
|
# Optimize these packages for performance.
|
|
# NB: the `bench` and `release` profiles must remain EXACTLY the same.
|
|
[profile.bench.package.rand]
|
|
opt-level = 3
|
|
[profile.bench.package.flate2]
|
|
opt-level = 3
|
|
[profile.bench.package.brotli]
|
|
opt-level = 3
|
|
[profile.bench.package.miniz_oxide]
|
|
opt-level = 3
|
|
[profile.bench.package.async-compression]
|
|
opt-level = 3
|
|
[profile.bench.package.brotli-decompressor]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_bench_util]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_core]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_runtime]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_http]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_web]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_broadcast_channel]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_fetch]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_ffi]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_tls]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_websocket]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_net]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_crypto]
|
|
opt-level = 3
|
|
[profile.bench.package.num-bigint-dig]
|
|
opt-level = 3
|
|
[profile.bench.package.v8]
|
|
opt-level = 3
|
|
[profile.bench.package.serde_v8]
|
|
opt-level = 3
|
|
[profile.bench.package.serde]
|
|
opt-level = 3
|
|
[profile.bench.package.deno_url]
|
|
opt-level = 3
|
|
[profile.bench.package.url]
|
|
opt-level = 3
|
|
[profile.bench.package.bytes]
|
|
opt-level = 3
|
|
[profile.bench.package.futures-util]
|
|
opt-level = 3
|
|
[profile.bench.package.hyper]
|
|
opt-level = 3
|
|
[profile.bench.package.tokio]
|
|
opt-level = 3
|
|
[profile.bench.package.zstd]
|
|
opt-level = 3
|
|
[profile.bench.package.lzzzz]
|
|
opt-level = 3
|
|
[profile.bench.package.zstd-sys]
|
|
opt-level = 3
|
|
[profile.bench.package.base64-simd]
|
|
opt-level = 3
|
|
|
|
# NB: the `bench` and `release` profiles must remain EXACTLY the same.
|
|
[profile.release.package.rand]
|
|
opt-level = 3
|
|
[profile.release.package.flate2]
|
|
opt-level = 3
|
|
[profile.release.package.brotli]
|
|
opt-level = 3
|
|
[profile.release.package.miniz_oxide]
|
|
opt-level = 3
|
|
[profile.release.package.async-compression]
|
|
opt-level = 3
|
|
[profile.release.package.brotli-decompressor]
|
|
opt-level = 3
|
|
[profile.release.package.deno_bench_util]
|
|
opt-level = 3
|
|
[profile.release.package.deno_core]
|
|
opt-level = 3
|
|
[profile.release.package.deno_runtime]
|
|
opt-level = 3
|
|
[profile.release.package.deno_http]
|
|
opt-level = 3
|
|
[profile.release.package.deno_flash]
|
|
opt-level = 3
|
|
[profile.release.package.deno_net]
|
|
opt-level = 3
|
|
[profile.release.package.deno_web]
|
|
opt-level = 3
|
|
[profile.release.package.deno_crypto]
|
|
opt-level = 3
|
|
[profile.release.package.deno_broadcast_channel]
|
|
opt-level = 3
|
|
[profile.release.package.deno_fetch]
|
|
opt-level = 3
|
|
[profile.release.package.deno_ffi]
|
|
opt-level = 3
|
|
[profile.release.package.deno_tls]
|
|
opt-level = 3
|
|
[profile.release.package.deno_websocket]
|
|
opt-level = 3
|
|
[profile.release.package.deno_napi]
|
|
opt-level = 3
|
|
[profile.release.package.test_napi]
|
|
opt-level = 3
|
|
[profile.release.package.num-bigint-dig]
|
|
opt-level = 3
|
|
[profile.release.package.v8]
|
|
opt-level = 3
|
|
[profile.release.package.serde_v8]
|
|
opt-level = 3
|
|
[profile.release.package.serde]
|
|
opt-level = 3
|
|
[profile.release.package.deno_url]
|
|
opt-level = 3
|
|
[profile.release.package.url]
|
|
opt-level = 3
|
|
[profile.release.package.bytes]
|
|
opt-level = 3
|
|
[profile.release.package.futures-util]
|
|
opt-level = 3
|
|
[profile.release.package.hyper]
|
|
opt-level = 3
|
|
[profile.release.package.tokio]
|
|
opt-level = 3
|
|
[profile.release.package.zstd]
|
|
opt-level = 3
|
|
[profile.release.package.lzzzz]
|
|
opt-level = 3
|
|
[profile.release.package.zstd-sys]
|
|
opt-level = 3
|
|
[profile.release.package.base64-simd]
|
|
opt-level = 3
|