feat(napi): support return *const c_char to JavaScript directly#2332
Merged
Brooooooklyn merged 1 commit intomainfrom Oct 28, 2024
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 |
Contributor
There was a problem hiding this comment.
Benchmark
Details
| Benchmark suite | Current: d464b50 | Previous: 79cbb91 | Ratio |
|---|---|---|---|
noop#napi-rs |
86436817 ops/sec (±0.12%) |
86361488 ops/sec (±0.19%) |
1.00 |
noop#JavaScript |
818590115 ops/sec (±0.08%) |
819673583 ops/sec (±0.09%) |
1.00 |
Plus number#napi-rs |
22251434 ops/sec (±0.37%) |
22789239 ops/sec (±0.49%) |
1.02 |
Plus number#JavaScript |
816919285 ops/sec (±0.08%) |
818369601 ops/sec (±0.08%) |
1.00 |
Create buffer#napi-rs |
616522 ops/sec (±13.55%) |
657943 ops/sec (±12.6%) |
1.07 |
Create buffer#JavaScript |
2902869 ops/sec (±11.13%) |
3172871 ops/sec (±2.14%) |
1.09 |
createArray#createArrayJson |
53766 ops/sec (±0.12%) |
53867 ops/sec (±0.48%) |
1.00 |
createArray#create array for loop |
9764 ops/sec (±0.54%) |
9826 ops/sec (±0.18%) |
1.01 |
createArray#create array with serde trait |
10031 ops/sec (±0.53%) |
10014 ops/sec (±0.45%) |
1.00 |
getArrayFromJs#get array from json string |
23649 ops/sec (±0.46%) |
23684 ops/sec (±0.47%) |
1.00 |
getArrayFromJs#get array from serde |
13363 ops/sec (±0.57%) |
13613 ops/sec (±0.28%) |
1.02 |
getArrayFromJs#get array with for loop |
16113 ops/sec (±0.51%) |
15987 ops/sec (±0.09%) |
0.99 |
Get Set property#Get Set from native#u32 |
573502 ops/sec (±12.33%) |
559338 ops/sec (±12.73%) |
0.98 |
Get Set property#Get Set from JavaScript#u32 |
519702 ops/sec (±11.27%) |
543980 ops/sec (±2.43%) |
1.05 |
Get Set property#Get Set from native#string |
592330 ops/sec (±1.81%) |
559989 ops/sec (±12.52%) |
0.95 |
Get Set property#Get Set from JavaScript#string |
517900 ops/sec (±2.03%) |
521306 ops/sec (±1.94%) |
1.01 |
Async task#spawn task |
27005 ops/sec (±0.79%) |
26914 ops/sec (±0.69%) |
1.00 |
Async task#ThreadSafeFunction |
9428 ops/sec (±0.8%) |
9465 ops/sec (±0.81%) |
1.00 |
Async task#Tokio future to Promise |
33083 ops/sec (±0.68%) |
32386 ops/sec (±0.73%) |
0.98 |
Query#query * 100 |
3494 ops/sec (±1.41%) |
3501 ops/sec (±1.37%) |
1.00 |
Query#query * 1 |
26514 ops/sec (±0.86%) |
26733 ops/sec (±0.78%) |
1.01 |
This comment was automatically generated by workflow using github-action-benchmark.
Member
Author
d22e704 to
d464b50
Compare
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.