Skip to content

feat(napi): impl from_string for Uint8Array #2167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2024

Conversation

Brooooooklyn
Copy link
Member

No description provided.

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

@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

Benchmark suite Current: b7c3399 Previous: a7ef9be Ratio
noop#napi-rs 86626709 ops/sec (±0.43%) 86497866 ops/sec (±0.42%) 1.00
noop#JavaScript 817730336 ops/sec (±0.8%) 818890308 ops/sec (±0.28%) 1.00
Plus number#napi-rs 21321350 ops/sec (±0.37%) 22092667 ops/sec (±0.16%) 1.04
Plus number#JavaScript 820736655 ops/sec (±0.1%) 819657573 ops/sec (±0.12%) 1.00
Create buffer#napi-rs 655681 ops/sec (±13%) 618325 ops/sec (±14.5%) 0.94
Create buffer#JavaScript 3386567 ops/sec (±2.56%) 3098354 ops/sec (±1.72%) 0.91
createArray#createArrayJson 56073 ops/sec (±0.63%) 55569 ops/sec (±0.53%) 0.99
createArray#create array for loop 9642 ops/sec (±0.51%) 9458 ops/sec (±0.33%) 0.98
createArray#create array with serde trait 9626 ops/sec (±0.45%) 9449 ops/sec (±0.48%) 0.98
getArrayFromJs#get array from json string 23792 ops/sec (±0.71%) 23828 ops/sec (±0.52%) 1.00
getArrayFromJs#get array from serde 13554 ops/sec (±0.09%) 13171 ops/sec (±0.52%) 0.97
getArrayFromJs#get array with for loop 15909 ops/sec (±0.52%) 15508 ops/sec (±0.37%) 0.97
Get Set property#Get Set from native#u32 556336 ops/sec (±13.02%) 544754 ops/sec (±13%) 0.98
Get Set property#Get Set from JavaScript#u32 528226 ops/sec (±2.41%) 529765 ops/sec (±2.55%) 1.00
Get Set property#Get Set from native#string 538108 ops/sec (±12.33%) 541118 ops/sec (±11.61%) 1.01
Get Set property#Get Set from JavaScript#string 502486 ops/sec (±2.23%) 503028 ops/sec (±1.94%) 1.00
Async task#spawn task 26467 ops/sec (±0.72%) 26471 ops/sec (±0.69%) 1.00
Async task#ThreadSafeFunction 9304 ops/sec (±1%) 9158 ops/sec (±0.81%) 0.98
Async task#Tokio future to Promise 32824 ops/sec (±1.52%) 34679 ops/sec (±0.87%) 1.06
Query#query * 100 3587 ops/sec (±1.29%) 3586 ops/sec (±1.66%) 1.00
Query#query * 1 26971 ops/sec (±0.59%) 26897 ops/sec (±0.76%) 1.00

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

@Brooooooklyn Brooooooklyn force-pushed the 07-05-feat_napi_impl_from_string_for_uint8array branch from fdec06a to b7c3399 Compare July 6, 2024 06:16
@Brooooooklyn Brooooooklyn merged commit aef57fb into main Jul 6, 2024
53 checks passed
@Brooooooklyn Brooooooklyn deleted the 07-05-feat_napi_impl_from_string_for_uint8array branch July 6, 2024 06:32
github-merge-queue bot referenced this pull request in rolldown/rolldown Jul 14, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [napi](https://togithub.com/napi-rs/napi-rs) | workspace.dependencies
| patch | `3.0.0-alpha.3` -> `3.0.0-alpha` |
| [napi-derive](https://togithub.com/napi-rs/napi-rs) |
workspace.dependencies | patch | `3.0.0-alpha.2` -> `3.0.0-alpha` |

---

### Release Notes

<details>
<summary>napi-rs/napi-rs (napi)</summary>

###
[`v3.0.0-alpha.6`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.6)

[Compare
Source](https://togithub.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.5...napi@3.0.0-alpha.6)

#### What's Changed

- chore(deps): update yarn to v3.6.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/napi-rs/napi-rs/pull/1702](https://togithub.com/napi-rs/napi-rs/pull/1702)
- chore(deps): update yarn to v3.6.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/napi-rs/napi-rs/pull/1708](https://togithub.com/napi-rs/napi-rs/pull/1708)
- chore(cli): update ci template by
[@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in
[https://github.com/napi-rs/napi-rs/pull/1771](https://togithub.com/napi-rs/napi-rs/pull/1771)
- Integrate with emnapi by
[@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in
[https://github.com/napi-rs/napi-rs/pull/1669](https://togithub.com/napi-rs/napi-rs/pull/1669)
- fix(cli): switch name parsing to allow periods in name by
[@&#8203;RaphaelDarley](https://togithub.com/RaphaelDarley) in
[https://github.com/napi-rs/napi-rs/pull/1716](https://togithub.com/napi-rs/napi-rs/pull/1716)
- chore: upgrade to yarn 4 by
[@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in
[https://github.com/napi-rs/napi-rs/pull/1774](https://togithub.com/napi-rs/napi-rs/pull/1774)
- fix(cli): js binding template by
[@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in
[https://github.com/napi-rs/napi-rs/pull/1788](https://togithub.com/napi-rs/napi-rs/pull/1788)

**Full Changelog**:
https://github.com/napi-rs/napi-rs/compare/napi@2.13.3...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.6

###
[`v3.0.0-alpha.5`](https://togithub.com/napi-rs/napi-rs/releases/tag/napi%403.0.0-alpha.5)

[Compare
Source](https://togithub.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.4...napi@3.0.0-alpha.5)

#### What's Changed

- feat(napi): impl from_string for Uint8Array by
[@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in
[https://github.com/napi-rs/napi-rs/pull/2167](https://togithub.com/napi-rs/napi-rs/pull/2167)
- feat(napi): provide PromiseRaw for non-await scenario by
[@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in
[https://github.com/napi-rs/napi-rs/pull/2168](https://togithub.com/napi-rs/napi-rs/pull/2168)

**Full Changelog**:
https://github.com/napi-rs/napi-rs/compare/[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.56...napi@3.0.0-alpha.5

###
[`v3.0.0-alpha.4`](https://togithub.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.3...napi@3.0.0-alpha.4)

[Compare
Source](https://togithub.com/napi-rs/napi-rs/compare/napi@3.0.0-alpha.3...napi@3.0.0-alpha.4)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: IWANABETHATGUY <iwanabethatguy@qq.com>
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