Search code examples
serializationboost

Which archive would load faster


I am using boost archiving to create archives.

i have two options

  1. Binary format

  2. XML format

which format would be read faster and would take less time to load ?


Solution

  • The Binary will be smaller and faster.

    XML will be more portable and human-readable.

    The main advantage of the XML format is that you can pass it around via HTTP(s) protocols.

    I'd have to argue that Binary Protocols will typically always win in performance vs text-based protocols. Ha, you won't find many (or any) video streaming applications using JSON to represent the frame data. However, any poorly designed data structure will struggle when being parsed. I've worked on many communications projects to where the text-based protocols were replaced with "binary protocols".