On Wednesday, August 2, 2017 at 4:19:35 PM UTC-5,
woodb...@gmail.com wrote:
>
> Konstantin, the guy who developed the benchmarks has
> updated the repo recently. Now I'm able to get past
> the build problem with capnproto, but am hitting a
> build problem with Thrift -- it can't find openssl/err.h.
> Shouldn't cmake check for that?
>
> I also tried building the benchmark project on Trueos/
> FreeBSD, but hit a build problem with Boost.
>
> Have I mentioned that the C++ Middleware Writer minimizes the
> amount of code that you have to download/build/maintain/etc?
>
I got past the build problems now and I got my version
of the test working. The serialized size of the Record
is 16,712 and the time is faster than cereal's time.
I haven't done any profiling, but from looking at the code
I think the call to resize below is kind of suspect.
Resize sets the first n bits of the storage and then those
same bits get reset.
template<class R>
Record::Record (::cmw::ReceiveBuffer<R>& buf){
int count[1];
count[0]=::cmw::Give<uint32_t>(buf);
if(count[0]>0){
ids.resize(count[0]);
buf.GiveBlock(&(*(ids.end()-count[0])),count[0]);
}
count[0]=::cmw::Give<uint32_t>(buf);
strings.reserve(count[0]);
for(;count[0]>0;--count[0]){
strings.emplace_back(buf.GiveString());
}
}
I've tried to rework that to use reserve, but my efforts
have so far been unsuccessful.