1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 09:10:40 -05:00
denoland-deno/test_napi
Divy Srivastava e136bd86b3
perf(napi): optimize primitive napi functions (#16163)
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-07 16:24:01 +05:30
..
src perf(napi): optimize primitive napi functions (#16163) 2022-10-07 16:24:01 +05:30
tests feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
.gitignore feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
array_test.js feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
async_test.js feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
build.rs feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
callback_test.js feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
Cargo.toml feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
coerce_test.js feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
common.js feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
numbers_test.js feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
object_wrap_test.js feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
promise_test.js feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
properties_test.js feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
strings_test.js feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30
typedarray_test.js feat(npm): implement Node API (#13633) 2022-10-05 19:36:44 +05:30