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

xdr: update using xdrgen#71 #4064

Merged
merged 2 commits into from
Nov 15, 2021
Merged

Conversation

2opremio
Copy link
Contributor

@2opremio 2opremio commented Nov 11, 2021

This PR regenerates the xdr types using stellar/xdrgen#71

There is a dramatic performance improvement. ~13x speedup and and 11x reduction of allocations.

goos: darwin
goarch: amd64
pkg: github.com/stellar/go/benchmarks
cpu: Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
BenchmarkXDRUnmarshalWithReflection
BenchmarkXDRUnmarshalWithReflection-8                 	   70221	     17617 ns/op	    5528 B/op	     185 allocs/op
BenchmarkXDRUnmarshal
BenchmarkXDRUnmarshal-8                               	  762405	      1360 ns/op	    1344 B/op	      17 allocs/op
BenchmarkGXDRUnmarshal
BenchmarkGXDRUnmarshal-8                              	   39950	     28912 ns/op	   86736 B/op	     278 allocs/op

This performance can be later improved even further by using the same approach as in #4056

@2opremio 2opremio force-pushed the generate-decodefrom branch 11 times, most recently from 89260ce to c292459 Compare November 12, 2021 18:00
@sreuland
Copy link
Contributor

nice work, new hire here, just trying to follow, amazed to see the custom xdr compiler. are there 'before' benchmarks to compare with the table captured here on latest results?

@2opremio 2opremio marked this pull request as ready for review November 15, 2021 21:38
@2opremio 2opremio requested review from a team, leighmcculloch and bartekn November 15, 2021 21:58
@2opremio 2opremio merged commit d9d4986 into stellar:master Nov 15, 2021
@2opremio 2opremio deleted the generate-decodefrom branch November 15, 2021 23:50
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.

3 participants