feat(napi): introduce AsyncBlock to let user dispose resources after future done#2338
Merged
Conversation
Member
Author
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @Brooooooklyn and the rest of your teammates on |
86615d3 to
ad29054
Compare
Contributor
There was a problem hiding this comment.
Benchmark
Details
| Benchmark suite | Current: c9b8a9b | Previous: 00a3c13 | Ratio |
|---|---|---|---|
noop#napi-rs |
86844257 ops/sec (±0.12%) |
86854261 ops/sec (±0.18%) |
1.00 |
noop#JavaScript |
820993498 ops/sec (±0.1%) |
823070163 ops/sec (±0.07%) |
1.00 |
Plus number#napi-rs |
23032954 ops/sec (±0.27%) |
23171023 ops/sec (±0.74%) |
1.01 |
Plus number#JavaScript |
821255737 ops/sec (±0.11%) |
822405455 ops/sec (±0.11%) |
1.00 |
Create buffer#napi-rs |
625693 ops/sec (±12.57%) |
634839 ops/sec (±12.85%) |
1.01 |
Create buffer#JavaScript |
3260278 ops/sec (±3.06%) |
3381599 ops/sec (±1.88%) |
1.04 |
createArray#createArrayJson |
53535 ops/sec (±0.56%) |
53917 ops/sec (±0.6%) |
1.01 |
createArray#create array for loop |
9796 ops/sec (±0.41%) |
9717 ops/sec (±0.62%) |
0.99 |
createArray#create array with serde trait |
10020 ops/sec (±0.52%) |
10026 ops/sec (±0.3%) |
1.00 |
getArrayFromJs#get array from json string |
24058 ops/sec (±1.41%) |
23966 ops/sec (±0.49%) |
1.00 |
getArrayFromJs#get array from serde |
11847 ops/sec (±2.19%) |
13708 ops/sec (±0.48%) |
1.16 |
getArrayFromJs#get array with for loop |
14394 ops/sec (±3.08%) |
15934 ops/sec (±0.32%) |
1.11 |
Get Set property#Get Set from native#u32 |
565487 ops/sec (±12.73%) |
574471 ops/sec (±12.53%) |
1.02 |
Get Set property#Get Set from JavaScript#u32 |
545193 ops/sec (±2.48%) |
546939 ops/sec (±2.5%) |
1.00 |
Get Set property#Get Set from native#string |
567571 ops/sec (±12.15%) |
569281 ops/sec (±11.63%) |
1.00 |
Get Set property#Get Set from JavaScript#string |
529159 ops/sec (±1.89%) |
516329 ops/sec (±1.8%) |
0.98 |
Async task#spawn task |
26841 ops/sec (±0.33%) |
26588 ops/sec (±0.78%) |
0.99 |
Async task#ThreadSafeFunction |
9403 ops/sec (±1.01%) |
9407 ops/sec (±0.71%) |
1.00 |
Async task#Tokio future to Promise |
31725 ops/sec (±1.02%) |
32961 ops/sec (±0.96%) |
1.04 |
Query#query * 100 |
3597 ops/sec (±0.72%) |
3583 ops/sec (±1.31%) |
1.00 |
Query#query * 1 |
26466 ops/sec (±1.01%) |
27093 ops/sec (±0.9%) |
1.02 |
This comment was automatically generated by workflow using github-action-benchmark.
ad29054 to
c9b8a9b
Compare
Member
Author
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.