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

fix(transport/memory): Improve the memory transport, 4x speed #2581

Merged
merged 3 commits into from
Oct 7, 2022

Conversation

jochumdev
Copy link
Contributor

@jochumdev jochumdev commented Oct 7, 2022

This PR improves the speed of memory transport by a margin of 4x.

Have fun with testing/monolith's :)

Thanks @Davincible for a lot of help and the pipe idea.

@jochumdev
Copy link
Contributor Author

jochumdev commented Oct 7, 2022

Go 1.19.1 benchmark results:


$ GOMAXPROCS=8 go test -v -benchmem -run=^$ -bench ^BenchmarkService1$ go-micro.dev/v4

memory-old+json:
BenchmarkService1-8         2540            437535 ns/op           18841 B/op        323 allocs/op

memory-old+protobuf:
BenchmarkService1-8         2668            395556 ns/op           16050 B/op        285 allocs/op

memory-new(gob)+json:
BenchmarkService1-8        19388             55618 ns/op           14701 B/op        211 allocs/op

memory-new(gob)+protobuf:
BenchmarkService1-8        28543             40749 ns/op           12076 B/op        175 allocs/op

memory-new(msgpack)+protobuf:
BenchmarkService1-8        13498             83545 ns/op           11532 B/op        177 allocs/op

@Davincible Davincible merged commit 24dfcef into micro:master Oct 7, 2022
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.

None yet

2 participants