Skip to content

refactor!(napi): introduce JsValue and JsObjectValue trait - #2606

Merged
Brooooooklyn merged 3 commits into
mainfrom
05-06-refactor_napi_introduce_jsvalue_and_jsobjectvalue_trait
May 6, 2025
Merged

refactor!(napi): introduce JsValue and JsObjectValue trait#2606
Brooooooklyn merged 3 commits into
mainfrom
05-06-refactor_napi_introduce_jsvalue_and_jsobjectvalue_trait

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Member

Add lifetime for JsGlobal JsTimeout and JSON

Add lifetime for JsGlobal JsTimeout and JSON

Brooooooklyn commented May 6, 2025

Copy link
Copy Markdown
Member Author

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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: ba90a23 Previous: 7010f60 Ratio
noop#napi-rs 83989535 ops/sec (±0.33%) 83945083 ops/sec (±0.31%) 1.00
noop#JavaScript 816369727 ops/sec (±0.18%) 817383897 ops/sec (±0.08%) 1.00
Plus number#napi-rs 28916802 ops/sec (±0.15%) 26599915 ops/sec (±0.87%) 0.92
Plus number#JavaScript 817153754 ops/sec (±0.1%) 816409759 ops/sec (±0.21%) 1.00
Create buffer#napi-rs 657872 ops/sec (±12.27%) 664454 ops/sec (±12.42%) 1.01
Create buffer#JavaScript 3634703 ops/sec (±3.15%) 3852171 ops/sec (±2.28%) 1.06
createArray#createArrayJson 53335 ops/sec (±0.66%) 54005 ops/sec (±0.27%) 1.01
createArray#create array for loop 10301 ops/sec (±0.26%) 10328 ops/sec (±0.44%) 1.00
createArray#create array with serde trait 10363 ops/sec (±0.09%) 10342 ops/sec (±0.42%) 1.00
getArrayFromJs#get array from json string 23412 ops/sec (±0.89%) 23186 ops/sec (±0.16%) 0.99
getArrayFromJs#get array from serde 12975 ops/sec (±0.48%) 12608 ops/sec (±0.36%) 0.97
getArrayFromJs#get array with for loop 15768 ops/sec (±1.02%) 16019 ops/sec (±0.65%) 1.02
Get Set property#Get Set from native#u32 543950 ops/sec (±12.96%) 564208 ops/sec (±11.78%) 1.04
Get Set property#Get Set from JavaScript#u32 544940 ops/sec (±2.32%) 526162 ops/sec (±2.42%) 0.97
Get Set property#Get Set from native#string 546776 ops/sec (±12.82%) 546036 ops/sec (±11.85%) 1.00
Get Set property#Get Set from JavaScript#string 524979 ops/sec (±2.17%) 510590 ops/sec (±1.92%) 0.97
Async task#spawn task 26391 ops/sec (±0.28%) 26198 ops/sec (±0.51%) 0.99
Async task#ThreadSafeFunction 9586 ops/sec (±0.76%) 9317 ops/sec (±1.29%) 0.97
Async task#Tokio future to Promise 31297 ops/sec (±0.43%) 31173 ops/sec (±0.91%) 1.00
Query#query * 100 3728 ops/sec (±0.51%) 3646 ops/sec (±0.71%) 0.98
Query#query * 1 28013 ops/sec (±0.79%) 27615 ops/sec (±0.6%) 0.99

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

@Brooooooklyn
Brooooooklyn force-pushed the 05-06-refactor_napi_introduce_jsvalue_and_jsobjectvalue_trait branch from 4d51483 to 493e1b1 Compare May 6, 2025 13:10
@Brooooooklyn
Brooooooklyn force-pushed the 05-06-refactor_napi_introduce_jsvalue_and_jsobjectvalue_trait branch 2 times, most recently from 1d8c2b7 to 44820dd Compare May 6, 2025 13:38
@Brooooooklyn
Brooooooklyn force-pushed the 05-06-refactor_napi_introduce_jsvalue_and_jsobjectvalue_trait branch 15 times, most recently from 2c214bb to 999c6b4 Compare May 6, 2025 15:02
@Brooooooklyn
Brooooooklyn force-pushed the 05-06-refactor_napi_introduce_jsvalue_and_jsobjectvalue_trait branch from 999c6b4 to c6833dc Compare May 6, 2025 15:10

Brooooooklyn commented May 6, 2025

Copy link
Copy Markdown
Member Author

Merge activity

  • May 6, 11:45 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • May 6, 11:45 AM EDT: @Brooooooklyn merged this pull request with Graphite.

@Brooooooklyn
Brooooooklyn merged commit 95832ff into main May 6, 2025
@Brooooooklyn
Brooooooklyn deleted the 05-06-refactor_napi_introduce_jsvalue_and_jsobjectvalue_trait branch May 6, 2025 15:45
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.

1 participant