diff options
author | Yuxuan 'fishy' Wang <yuxuan.wang@reddit.com> | 2020-01-18 12:55:51 -0800 |
---|---|---|
committer | Duru Can Celasun <dcelasun@apache.org> | 2020-01-18 20:55:51 +0000 |
commit | 397645ac24874b6f54d88b2700e56be090753825 (patch) | |
tree | fa59900d864e2c15e4a04f3a8857c9166b9f3b36 /doc | |
parent | a5ec666e1ba76fe7385ed56f484c9dfdd5b6bfc9 (diff) | |
download | thrift-397645ac24874b6f54d88b2700e56be090753825.tar.gz |
THRIFT-5069: Make TDeserializer resource pool friendly
Client: go
This change improves performance when using TDeserializer with a
resource pool. See https://issues.apache.org/jira/browse/THRIFT-5069 for
more context.
Also add TSerializerPool and TDeserializerPool, which are thread-safe
versions of TSerializer and TDeserializer. Benchmark result shows that
they are both faster and use less memory than the plain version:
$ go test -bench Serializer -benchmem
goos: darwin
goarch: amd64
BenchmarkSerializer/baseline-8 577558 1930 ns/op 512 B/op 6 allocs/op
BenchmarkSerializer/plain-8 452712 2638 ns/op 2976 B/op 16 allocs/op
BenchmarkSerializer/pool-8 591698 2032 ns/op 512 B/op 6 allocs/op
PASS
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions