Open
Description
In version 2.2.1, all serialization and deserialization methods perform the following sequence of actions:
{
size_t align = alignment(sizeof(SomeType));
last_data_size_ = sizeof(SomeType);
make_alignment(align);
...
}
Since last_data_size_
is zeroed in the make_alignment()
method, subsequent alignment()
calls will be performed with the full calculation of the expression:
inline size_t alignment(size_t data_size) const
{
return data_size > last_data_size_ ? (data_size - ((offset_ - origin_) % data_size)) & (data_size - 1) : 0;
}
Apparently, optimization based on the use of last_data_size_
does not work in this case.
Metadata
Metadata
Assignees
Labels
No labels