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

[性能优化]提升hessian库解码string的性能 #186

Closed
zonghaishang opened this issue May 14, 2020 · 1 comment
Closed

[性能优化]提升hessian库解码string的性能 #186

zonghaishang opened this issue May 14, 2020 · 1 comment

Comments

@zonghaishang
Copy link
Member

zonghaishang commented May 14, 2020

What would you like to be added:

背景:

在使用hessian库解码时,遇到hessian在处理string时性能很差。

优化前后数据对比(提升56.11%):

BenchmarkDecodeStringSlow-12     1967202     613 ns/op     272 B/op     6 allocs/op
BenchmarkDecodeStringOptimized-12     4477216     269 ns/op     224 B/op     5 allocs/op

hessian go库内部多处会用到decode string, 比如map、list,因此会带来整体库性能收益。

Why is this needed:

提升rpc性能

@zonghaishang
Copy link
Member Author

merged, close it now.

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