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

ytypes.GetNode consumes more CPU & memory than the deprecated util.GetNode #909

Open
wenovus opened this issue Aug 14, 2023 · 0 comments
Open

Comments

@wenovus
Copy link
Collaborator

wenovus commented Aug 14, 2023

go test -bench=. -benchmem for commit 8fe9f7a:

goos: linux
goarch: amd64
pkg: github.com/openconfig/ygot/ytypes/schema_tests
cpu: Intel(R) Xeon(R) CPU @ 2.80GHz
BenchmarkInterfaceLeafrefs1-48                 1        7915135643 ns/op        4730326800 B/op 77062596 allocs/op
BenchmarkInterfaceLeafrefs2-48                 1        5572959892 ns/op        3378585712 B/op 53392395 allocs/op
BenchmarkInterfaceLeafrefs3-48                 1        5441648833 ns/op        3404838072 B/op 55683811 allocs/op```

For commit e784a05:

goos: linux
goarch: amd64
pkg: github.com/openconfig/ygot/ytypes/schema_tests
cpu: Intel(R) Xeon(R) CPU @ 2.80GHz
BenchmarkInterfaceLeafrefs1-48                 1        6849021162 ns/op        4332677448 B/op 68270498 allocs/op
BenchmarkInterfaceLeafrefs2-48                 1        5050827027 ns/op        3227386800 B/op 49832383 allocs/op
BenchmarkInterfaceLeafrefs3-48                 1        5014178642 ns/op        3224972784 B/op 51428657 allocs/op

git log:

* 8fe9f7a Deprecate `util.GetNodes` in favour of `ytypes.GetNode` (#852)
* e784a05 (HEAD) Support unmarshalling an atomic `Notification` for ordered lists. (#851)
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

No branches or pull requests

1 participant