From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 48D682899C for ; Thu, 31 May 2018 11:29:33 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id meL8ps9Qoqw3 for ; Thu, 31 May 2018 11:29:33 -0400 (EDT) Received: from smtp35.i.mail.ru (smtp35.i.mail.ru [94.100.177.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 0696328696 for ; Thu, 31 May 2018 11:29:32 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v2 1/1] box: create bigrefs for tuples References: From: Vladislav Shpilevoy Message-ID: <614ee41d-a006-3cff-78d5-8fc246a128b1@tarantool.org> Date: Thu, 31 May 2018 18:29:30 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, imeevma@tarantool.org 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).