.net 聊聊JSON框架的性能对比(KoobooJSON,NewtonsoftJSON,SwifterJSON) 电脑版发表于:2020/7/14 15:17  >#.net 聊聊JSON框架的性能对比 [TOC] <br/> 环境配置 ------------ <br/> >.NET Framework 4.7.2 56000多条数据 KoobooJSON ------------ >###Kooboo JSON与Newtonsoft Json序列化对比 <br/> >耗时对比  >CPU占用率  >###Kooboo JSON与Newtonsoft Json反序列化对比 <br/> >耗时对比  >CPU占用率(第一次)  >CPU占用率(第二次)  >###Kooboo JSON 相关内容 Github: https://github.com/kooboo/Json Nuget: https://www.nuget.org/packages/Kooboo.Json/ SwifterJSON ------------ >###Swifter JSON与Newtonsoft Json序列化对比 <br/> >耗时对比  >CPU占用率  >###Swifter JSON与Newtonsoft Json反序列化对比 <br/> >耗时对比(第一次)  >CPU占用率(第一次)  >耗时对比(第二次)  >CPU占用率(第一次)  >###Swifter JSON 相关内容 Github: https://github.com/Dogwei/Swifter.Json Nuget: https://www.nuget.org/packages/Swifter.Json 表格呈现 ------------ >###序列化对比 | 框架名称 | 耗时 | CPU占用率 | | ------------ | ------------ | ------------ | | KoobooJSON | 1011.2906ms | 16.79% | | NewtonsoftJSON | 1442.1246ms-1660.5411ms | 23.39%-25.73% | | SwifterJSON | 910.5576ms | 9.56% | >###反序列化对比 | 框架名称 | 耗时 | CPU占用率 | | ------------ | ------------ | ------------ | | KoobooJSON | 3265.2612ms | 38.81%-38.72% | | NewtonsoftJSON | 2358.6967ms-2643.8704ms | 33.47%-41.96% | | SwifterJSON | 1283.5357ms-1853.5825ms | 22.47%-24.35% | 总结 ------------ tn>感觉SwifterJSON比其他的JSON库要强大些,比较片面,如有误请评论区的大佬发言!