因此,在我看过的许多基准测试中,protobuf-net远远领先于BinaryFormatter: - http://theburningmonk.com/2011/08/performance-test-binaryformatter-vs-protobuf-net/ - https://code.google.com/p/protobuf-net/wiki/Performance
这引出了一个问题:如果protobuf-net可用,你为什么要使用BinaryFormatter?
我已经阅读了有关BinaryFormatter存储类型元数据的内容,这是protobuf不能做的事情。您能给我一个示例场景,我希望存储类型元数据吗?
答案 0 :(得分:1)
我目前正在努力使用protobuf-net来序列化Dictionary<string, object>
类型的对象。我读过的是,这是不可能的,所以我想这是一个人们更喜欢BinaryFormatter的场景。