-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(napi): fallback to copy buffer if zero copy is not allowed
- Loading branch information
1 parent
bdbdbcc
commit 120a043
Showing
4 changed files
with
154 additions
and
166 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
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.
120a043
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
noop#napi-rs
49025317
ops/sec (±0.97%
)68073691
ops/sec (±0.34%
)1.39
noop#JavaScript
681933457
ops/sec (±1%
)591619541
ops/sec (±0.13%
)0.87
Plus number#napi-rs
15692608
ops/sec (±1.34%
)20646334
ops/sec (±0.24%
)1.32
Plus number#JavaScript
651232689
ops/sec (±0.9%
)591398593
ops/sec (±0.1%
)0.91
Create buffer#napi-rs
340634
ops/sec (±8.87%
)445751
ops/sec (±6.3%
)1.31
Create buffer#JavaScript
1858767
ops/sec (±6.36%
)2193405
ops/sec (±6.17%
)1.18
createArray#createArrayJson
34516
ops/sec (±0.86%
)45946
ops/sec (±0.11%
)1.33
createArray#create array for loop
5819
ops/sec (±0.67%
)7809
ops/sec (±0.09%
)1.34
createArray#create array with serde trait
5920
ops/sec (±1.16%
)7907
ops/sec (±0.29%
)1.34
getArrayFromJs#get array from json string
14882
ops/sec (±1.18%
)17734
ops/sec (±0.12%
)1.19
getArrayFromJs#get array from serde
7982
ops/sec (±0.74%
)9780
ops/sec (±0.06%
)1.23
getArrayFromJs#get array with for loop
10224
ops/sec (±0.77%
)12586
ops/sec (±0.13%
)1.23
Get Set property#Get Set from native#u32
347692
ops/sec (±5.76%
)413589
ops/sec (±4.81%
)1.19
Get Set property#Get Set from JavaScript#u32
289673
ops/sec (±5.45%
)343075
ops/sec (±4.68%
)1.18
Get Set property#Get Set from native#string
319091
ops/sec (±5.44%
)368779
ops/sec (±4.51%
)1.16
Get Set property#Get Set from JavaScript#string
262335
ops/sec (±7.44%
)326443
ops/sec (±4.9%
)1.24
Async task#spawn task
25895
ops/sec (±4.53%
)35766
ops/sec (±1.47%
)1.38
Async task#ThreadSafeFunction
1730
ops/sec (±3.77%
)2790
ops/sec (±7.79%
)1.61
Async task#Tokio future to Promise
27798
ops/sec (±3.86%
)32605
ops/sec (±0.99%
)1.17
Query#query * 100
1595
ops/sec (±2.82%
)2104
ops/sec (±2.07%
)1.32
Query#query * 1
21763
ops/sec (±5.16%
)32734
ops/sec (±0.38%
)1.50
This comment was automatically generated by workflow using github-action-benchmark.