ego008 avatar

Golang deepcopy 的性能

🕥 by ego008

使用 reflecting 和 gob 两种方式,性能比较结果:

1
Deep copy with reflecting is 10x faster than gob and it will save more memory.
reflecting 使用库 https://github.com/mohae/deepcopy 过程参见 https://xuri.me/2018/06/17/deep-copy-object-with-reflecting-or-gob-in-go.html

💘 相关文章

写一条评论

Based on Golang + fastHTTP + sdb | go1.17.1 Processed in 1ms