Skip to content
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

Remove unstable.Parser allocation when creating Decoder #953

Merged
merged 1 commit into from
May 24, 2024

Conversation

mvdan
Copy link
Contributor

@mvdan mvdan commented May 24, 2024

(see commit message)

This way, calls to Unmarshal or Decoder.Decode allocate once
at the start rather than twice.

                                │    old     │               new                │
                                │ allocs/op  │ allocs/op   vs base              │
    Unmarshal/HugoFrontMatter-8   141.0 ± 0%   140.0 ± 0%  -0.71% (p=0.002 n=6)
@pelletier pelletier merged commit bccd6e4 into pelletier:v2 May 24, 2024
11 checks passed
@pelletier pelletier added the performance Issue related to a performance problem or pull request improving performance. label Aug 23, 2024
@pelletier pelletier changed the title allocate unstable.Parser as part of decoder Remove unstable.Parser allocation when creating Decoder Aug 23, 2024
dmathieu pushed a commit to open-telemetry/opentelemetry-go-contrib that referenced this pull request Aug 26, 2024
…6040)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml)
| `v2.2.2` -> `v2.2.3` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.2/v2.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fpelletier%2fgo-toml%2fv2/v2.2.2/v2.2.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pelletier/go-toml (github.com/pelletier/go-toml/v2)</summary>

###
[`v2.2.3`](https://github.com/pelletier/go-toml/releases/tag/v2.2.3)

[Compare
Source](https://github.com/pelletier/go-toml/compare/v2.2.2...v2.2.3)

<!-- Release notes generated using configuration in .github/release.yml
at v2.2.3 -->

#### What's Changed

##### What's new

- Allow `int`, `uint`, and `float` as map keys by
[@&#8203;daniel-weisse](https://github.com/daniel-weisse) in
[pelletier/go-toml#958

##### Performance

- Remove unstable.Parser allocation when creating Decoder by
[@&#8203;mvdan](https://github.com/mvdan) in
[pelletier/go-toml#953

##### Fixed bugs

- Fix reflect.Pointer backward compatibility by
[@&#8203;xxxVitoxxx](https://github.com/xxxVitoxxx) in
[pelletier/go-toml#956

##### Documentation

- Fix readme typo by [@&#8203;testwill](https://github.com/testwill)
in
[pelletier/go-toml#951

##### Other changes

- go.mod: bump minimum language version to 1.21 by
[@&#8203;mvdan](https://github.com/mvdan) in
[pelletier/go-toml#949
- Bump testing to go 1.23 by
[@&#8203;pelletier](https://github.com/pelletier) in
[pelletier/go-toml#961

#### New Contributors

- [@&#8203;mvdan](https://github.com/mvdan) made their first
contribution in
[pelletier/go-toml#949
- [@&#8203;testwill](https://github.com/testwill) made their first
contribution in
[pelletier/go-toml#951
- [@&#8203;xxxVitoxxx](https://github.com/xxxVitoxxx) made their first
contribution in
[pelletier/go-toml#956

**Full Changelog**:
pelletier/go-toml@v2.2.2...v2.2.3

</details>

---

### Configuration

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

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

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

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

---

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

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Issue related to a performance problem or pull request improving performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants