The C++ Middleware Writer (CMW) has advantages over the serialization library in Boost:
| Usage | Performance | Message support | Boost Intrusive support |
For testing purposes we build the serialization library in Boost 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.
These programs marshal a deque of ints.
Boost versionWith a command line argument of 5,000,000, the Boost version is over 1.1 times slower than the Ebenezer version.
With a command line argument of 500000, the Boost version of the above test is over 1.8 times slower than the corresponding Ebenezer version.
The following programs input a deque of ints.
Boost versionWith a command line argument of 5,000,000, the Boost version is over 3 times slower than the Ebenezer version and the stripped Boost executable is more than 4 times larger than the stripped Ebenezer executable.
These programs input to a vector<deque<double> >.
Boost version With a command line argument of 500000, the Boost version is
over 3 times slower than the Ebenezer version. (The serialization
library in Boost doesn't make use of std::move.) The stripped
Boost executable is more than 2.6 times larger than the stripped
Ebenezer executable.
Support for Messages:
The Middle language offers support for messages that's not available with the serialization library in Boost. For example, the following Middle code has two messages.
remote_messages_middle @out @msg_id_login (std::vector) @out @msg_id_direct (cmw::marshalling_integer, cmw_user_input) }
When @msg_id... is used, the generated marshalling functions
marshal the value associated with their message id before
marshalling message data.
Support for Boost Intrusive Containers:
The C++ Middleware Writer has support for some Boost Intrusive containers. Neither Boost Intrusive nor the serialization library in Boost offer serialization support for these 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.