From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org, imeevma@tarantool.org Subject: [tarantool-patches] Re: [PATCH v2 1/1] box: create bigrefs for tuples Date: Thu, 31 May 2018 18:29:30 +0300 [thread overview] Message-ID: <614ee41d-a006-3cff-78d5-8fc246a128b1@tarantool.org> (raw) In-Reply-To: <d75bfbb7221ae94c978d87f9efc58e2fdcd0e309.1527693815.git.imeevma@gmail.com> One more comment. I have an idea how to remove FLAG from enum. Lets do this: diff --git a/src/box/tuple.h b/src/box/tuple.h index dd5e11e5e..e8bcf5cf9 100644 --- a/src/box/tuple.h +++ b/src/box/tuple.h @@ -308,7 +308,8 @@ box_tuple_upsert(const box_tuple_t *tuple, const char *expr, const struct PACKED tuple { /** reference counter */ - uint16_t refs; + uint16_t refs : 15; + bool is_bigref : 1; /** format identifier */ uint16_t format_id; /** So you still store 15 bits refs and 1 bit flag. But now can access them directly with no xor. I have checked, it weights the same byte count as single uint16_t field. (sizeof(tuple) is still 10).
next prev parent reply other threads:[~2018-05-31 15:29 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-30 15:26 [tarantool-patches] " imeevma 2018-05-31 12:51 ` [tarantool-patches] " Vladislav Shpilevoy 2018-05-31 15:29 ` Vladislav Shpilevoy [this message] 2018-06-01 15:41 [tarantool-patches] " imeevma 2018-06-01 19:11 ` [tarantool-patches] " Konstantin Osipov 2018-06-04 11:21 ` Vladislav Shpilevoy 2018-06-04 14:21 ` Imeev Mergen 2018-06-04 20:57 ` Vladislav Shpilevoy 2018-06-04 21:20 ` Vladislav Shpilevoy 2018-06-08 3:27 ` Konstantin Osipov 2018-06-08 3:18 ` Konstantin Osipov 2018-06-08 3:26 ` Konstantin Osipov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=614ee41d-a006-3cff-78d5-8fc246a128b1@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=imeevma@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v2 1/1] box: create bigrefs for tuples' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox