Modified 'unpacked' interface using references instead of pointers.

Added speed test for 'unpacked' based unpack() function.
This commit is contained in:
Takatoshi Kondo
2013-09-04 16:53:47 +09:00
parent 521a4f4190
commit 27629a8dd6
4 changed files with 24 additions and 14 deletions

View File

@@ -36,6 +36,16 @@ void test_map_pack_unpack() {
std::cout << result << std::endl;
}
std::cout << "Unpack finished..." << std::endl;
msgpack::unpacked unpacked;
std::cout << "Start unpacking...by void unpack(unpacked* result, const char* data, size_t len, size_t* offset = NULL)" << std::endl;
{
boost::timer::cpu_timer timer;
msgpack::unpack(unpacked, str.data(), str.size());
std::string result = timer.format();
std::cout << result << std::endl;
}
std::cout << "Unpack finished..." << std::endl;
}