Warning: Undefined global variable $debug in /var/www/ourcoders/tiny4cocoa/application/controllers/baseController.php on line 124
灵感之源 2019-11-21 00:00:00 发布的技术动态 - OurCoders (我们程序员)
灵感之源
2019-11-21 00:00:00 发布
做对象深度复制,可以考虑用序列化/反序列化,复杂对象尤甚。性能上的对比,拿.net环境来讲,如果二进制BinaryFormattet性能基准是1,那么nuget下载量最高的newtonsoft.json(惊人的3亿多人次)是2.5,.net core 3.0引入的System.Text.Json.JsonSerializer是3,Google家的protobuf的.net实现protobuf-net是8,数字越大,速度越快。简而言之:protobuf很快