The C++ Middleware Writer (CMW) has advantages over the Boost Serialization library in the following areas:
| Usage | Performance | Message support | Boost Intrusive support |
For testing purposes we build the Boost Serialization library with variant=release and link=static. The tests are run three times in a row using a semicolon on Linux to separate the executions. The fastest time of the three is the only one used in the comparisons.
This set of programs serialize a list of ints.
Boost versionWith a command line argument of 500000, the Boost version is between 1.1 and 1.2 times slower than the Ebenezer version.
These programs marshal a list of ints and a deque of ints.
Boost versionWith a command line argument of 500000, the Boost version is between 1.2 and 1.3 times slower than the Ebenezer version.
With a command line argument of 500000, the Boost Serialization versions of both of the above tests are between 1.7 and 1.8 times slower than the corresponding Ebenezer version.
The following programs input a list of ints.
Boost versionWith a command line argument of 500000, the Boost version is between 1.4 and 1.6 times slower than the Ebenezer version and the stripped Boost Serialization executable is more than 2.6 times larger than the stripped Ebenezer executable.
These programs input to a vector<deque<double> >.
Boost version With a command line argument of 100000, the Boost version is
over 2.4 times slower than the Ebenezer version. (The Ebenezer marshalling
code was generated with Permit-std::move turned on. The Boost
Serialization library doesn't make use of ::std::move.) The stripped
Boost Serialization executable is more than 2.6 times larger than
the stripped Ebenezer executable.
Support for Messages:
The Middle language offers support for messages and message IDs that's not available with the Boost Serialization library. For example, the following Middle code has two messages.
msg_manager @msg_id_abc (std::vector<double>, int8_t) @msg_id_result (bool, std::string) }
When @msg_id... is used, the generated Marshal functions
marshal the value associated with their message id before
marshalling anything else.
Support for Boost Intrusive Containers:
Only the C++ Middleware Writer has support for Boost Intrusive containers. Neither the Boost Intrusive nor Boost Serialization libraries offer serialization support for these useful containers.
The primary weakness is that we don't support some C++ features. We have limited support for user defined templates, nested classes and some other features of the language. We are working on shortening this list.