mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
lang/c/msgpack: update C++ code
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@51 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
parent
529a50633d
commit
7c427400a7
4 changed files with 439 additions and 567 deletions
|
|
@ -98,9 +98,9 @@ static void pack_append_buffer(void* user, const unsigned char* b, unsigned int
|
|||
|
||||
|
||||
static const unsigned int TASK_INT_NUM = 1<<24;
|
||||
static const unsigned int TASK_STR_LEN = 1<<15;
|
||||
//static const unsigned int TASK_STR_LEN = 1<<15;
|
||||
//static const unsigned int TASK_INT_NUM = 1<<20;
|
||||
//static const unsigned int TASK_STR_LEN = 1<<12;
|
||||
static const unsigned int TASK_STR_LEN = 1<<12;
|
||||
static const char* TASK_STR_PTR;
|
||||
|
||||
|
||||
|
|
@ -284,6 +284,7 @@ void bench_msgpack(void)
|
|||
msgpack_unpack_reset(mupk);
|
||||
|
||||
|
||||
/*
|
||||
puts("----");
|
||||
puts("pack string");
|
||||
reset_timer();
|
||||
|
|
@ -316,6 +317,7 @@ void bench_msgpack(void)
|
|||
sec = show_timer();
|
||||
|
||||
printf("%f MB/s\n", len / sec / 1024 / 1024);
|
||||
*/
|
||||
|
||||
|
||||
msgpack_unpack_free(mupk);
|
||||
|
|
@ -330,7 +332,7 @@ int main(int argc, char* argv[])
|
|||
TASK_STR_PTR = str;
|
||||
|
||||
bench_msgpack();
|
||||
bench_json();
|
||||
// bench_json();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue