Skip to content

fix(napi): needless cast to CString before call napi_create_string_utf8#2321

Merged
Brooooooklyn merged 1 commit intomainfrom
10-21-fix_napi_needless_cast_to_cstring_before_call_napi_create_string_utf8
Oct 21, 2024
Merged

fix(napi): needless cast to CString before call napi_create_string_utf8#2321
Brooooooklyn merged 1 commit intomainfrom
10-21-fix_napi_needless_cast_to_cstring_before_call_napi_create_string_utf8

Conversation

@Brooooooklyn
Copy link
Member

@Brooooooklyn Brooooooklyn commented Oct 21, 2024

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Brooooooklyn and the rest of your teammates on Graphite Graphite

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Details
Benchmark suite Current: 601a8ec Previous: de3a60d Ratio
noop#napi-rs 86722079 ops/sec (±0.09%) 86712023 ops/sec (±0.36%) 1.00
noop#JavaScript 819603610 ops/sec (±0.11%) 819786193 ops/sec (±0.33%) 1.00
Plus number#napi-rs 23179807 ops/sec (±0.41%) 23281277 ops/sec (±0.25%) 1.00
Plus number#JavaScript 818398494 ops/sec (±0.1%) 816532639 ops/sec (±0.34%) 1.00
Create buffer#napi-rs 671008 ops/sec (±12.36%) 663644 ops/sec (±11.92%) 0.99
Create buffer#JavaScript 3248633 ops/sec (±7.2%) 3183583 ops/sec (±6.67%) 0.98
createArray#createArrayJson 53574 ops/sec (±0.52%) 54335 ops/sec (±0.42%) 1.01
createArray#create array for loop 9970 ops/sec (±0.51%) 9897 ops/sec (±0.36%) 0.99
createArray#create array with serde trait 9943 ops/sec (±0.46%) 9907 ops/sec (±0.12%) 1.00
getArrayFromJs#get array from json string 23554 ops/sec (±0.64%) 23769 ops/sec (±0.5%) 1.01
getArrayFromJs#get array from serde 13715 ops/sec (±0.21%) 13589 ops/sec (±0.92%) 0.99
getArrayFromJs#get array with for loop 16215 ops/sec (±0.36%) 15950 ops/sec (±0.62%) 0.98
Get Set property#Get Set from native#u32 580262 ops/sec (±12.5%) 575687 ops/sec (±12.78%) 0.99
Get Set property#Get Set from JavaScript#u32 552891 ops/sec (±2.4%) 536543 ops/sec (±2.49%) 0.97
Get Set property#Get Set from native#string 568768 ops/sec (±11.33%) 566114 ops/sec (±10.81%) 1.00
Get Set property#Get Set from JavaScript#string 521172 ops/sec (±2.02%) 519561 ops/sec (±2%) 1.00
Async task#spawn task 26852 ops/sec (±0.51%) 27095 ops/sec (±0.6%) 1.01
Async task#ThreadSafeFunction 9581 ops/sec (±0.86%) 9701 ops/sec (±0.5%) 1.01
Async task#Tokio future to Promise 32328 ops/sec (±0.93%) 32819 ops/sec (±0.77%) 1.02
Query#query * 100 3510 ops/sec (±1.86%) 3613 ops/sec (±0.57%) 1.03
Query#query * 1 26500 ops/sec (±0.98%) 26891 ops/sec (±0.74%) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@Brooooooklyn Brooooooklyn force-pushed the 10-21-fix_napi_needless_cast_to_cstring_before_call_napi_create_string_utf8 branch from c0a253e to f195691 Compare October 21, 2024 04:33
@Brooooooklyn Brooooooklyn force-pushed the 10-21-fix_napi_needless_cast_to_cstring_before_call_napi_create_string_utf8 branch from f195691 to 601a8ec Compare October 21, 2024 04:36
@Brooooooklyn Brooooooklyn merged commit 52c424a into main Oct 21, 2024
@Brooooooklyn Brooooooklyn deleted the 10-21-fix_napi_needless_cast_to_cstring_before_call_napi_create_string_utf8 branch October 21, 2024 04:48
richerfu pushed a commit to richerfu/napi-rs that referenced this pull request Oct 23, 2024
richerfu pushed a commit to richerfu/napi-rs that referenced this pull request Oct 23, 2024
richerfu pushed a commit to richerfu/napi-rs that referenced this pull request Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected panic from napi side for specific inputs

1 participant