cloudwego / dynamicgo

Dynamically and efficiently operate RPC data for Go
Apache License 2.0
148 stars 28 forks source link

perf(thrift): new pure go Skip impl, 1x better performance #59

Closed xiaost closed 4 months ago

xiaost commented 4 months ago
goos: darwin
goarch: amd64
pkg: github.com/cloudwego/dynamicgo/thrift
cpu: VirtualApple @ 2.50GHz
                      │  ./old.txt  │              ./new.txt              │
                      │   sec/op    │   sec/op     vs base                │
SkipNoCheck/native-10   185.9n ± 1%   172.6n ± 1%   -7.13% (p=0.000 n=10)
SkipNoCheck/go-10       199.2n ± 1%   100.4n ± 1%  -49.62% (p=0.000 n=10)
geomean                 192.4n        131.6n       -31.60%

                      │  ./old.txt   │              ./new.txt               │
                      │     B/s      │     B/s       vs base                │
SkipNoCheck/native-10   333.6Mi ± 1%   359.1Mi ± 1%   +7.65% (p=0.000 n=10)
SkipNoCheck/go-10       311.1Mi ± 1%   617.9Mi ± 1%  +98.58% (p=0.000 n=10)
geomean                 322.2Mi        471.0Mi       +46.21%

What type of PR is this?

perf

Check the PR title.

(Optional) Translate the PR title into Chinese.

对 纯Go版本的 thrift skip 进行性能优化, 一倍性能提升。

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: zh(optional):

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation: