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

Improve parser performance #494

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Improve parser performance #494

merged 1 commit into from
Oct 31, 2024

Conversation

goccy
Copy link
Owner

@goccy goccy commented Oct 31, 2024

Improve parser performance ( inspired by #438, Thanks )

resolve #325

30% Speed up

BEFORE

goos: darwin
goarch: arm64
pkg: benchmarks
Benchmark/gopkg.in/yaml.v2-10             244044              4919 ns/op
Benchmark/gopkg.in/yaml.v3-10             167894              7052 ns/op
Benchmark/github.com/goccy/go-yaml-10      93895             12559 ns/op

AFTER

goos: darwin
goarch: arm64
pkg: benchmarks
Benchmark/gopkg.in/yaml.v2-10             242497              4945 ns/op
Benchmark/gopkg.in/yaml.v3-10             167689              6988 ns/op
Benchmark/github.com/goccy/go-yaml-10     126858              9333 ns/op

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 88.82979% with 21 lines in your changes missing coverage. Please review.

Project coverage is 77.67%. Comparing base (3788afc) to head (6e2b871).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #494      +/-   ##
==========================================
- Coverage   77.73%   77.67%   -0.06%     
==========================================
  Files          18       18              
  Lines        5901     5887      -14     
==========================================
- Hits         4587     4573      -14     
  Misses       1039     1039              
  Partials      275      275              

@goccy goccy merged commit ad223ff into master Oct 31, 2024
18 checks passed
@goccy goccy deleted the improve-parser-performance branch October 31, 2024 09:26
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.

There is a bad performance hit when upgrading to >= 1.9.2
2 participants