Sha256: 7743a8db36db53be1bd57c0bab1cf0f66a71056a7c326556ad210187b6affff5

Contents?: true

Size: 739 Bytes

Versions: 12

Compression:

Stored size: 739 Bytes

Contents

#include <msgpack.h>

void test()
{
    uint64_t test_u64 = 0xFFF0000000000001LL;
    size_t size = 10000000;
    msgpack_sbuffer buf;
    msgpack_packer * pk;
    size_t upk_pos = 0;
    msgpack_unpacked msg;

    msgpack_sbuffer_init(&buf);

    pk = msgpack_packer_new(&buf, msgpack_sbuffer_write);

    msgpack_pack_array(pk, size);
    {
        size_t idx = 0;
        for (; idx < size; ++idx)
            msgpack_pack_uint64(pk, test_u64);
    }
    msgpack_packer_free(pk);

    msgpack_unpacked_init(&msg);

    while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos) == MSGPACK_UNPACK_SUCCESS) {
    }

    msgpack_sbuffer_destroy(&buf);
}

int main(void)
{
    int i = 0;
    for (; i < 10; ++i) test();
    return 0;
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
script_core-0.3.2 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c
script_core-0.3.0 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c
script_core-0.2.7 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c
script_core-0.2.6 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c
script_core-0.2.5 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c
script_core-0.2.4 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c
script_core-0.2.3 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c
script_core-0.2.2 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c
script_core-0.2.1 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c
script_core-0.2.0 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c
script_core-0.1.1 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c
script_core-0.1.0 ext/enterprise_script_service/msgpack/example/c/speed_test_uint64_array.c