From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id A70996EC5C; Sun, 28 Feb 2021 20:35:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A70996EC5C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614533742; bh=XPzxcLYPP9rnfDOifkpNvGu8UC2c1vH/6xQ2g+2sN2M=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ftXfavX8B/45MaKWupdNx/FqFqtNqSbQFVFueVgcGLZUoP3+zd/eF0OHZHG0BP6vF 1PneIzkp1zjuwOOuq3EBp0XP42Ag3OBIRg6WRQEX2RzOx9ePRM1nGav2cEuEHIFI3j F2jh+H5bX3/8nnw56+jpLHisYJPC+8rk8mpH9toc= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id F1BBB6EC5C for ; Sun, 28 Feb 2021 20:35:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F1BBB6EC5C Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1lGPyn-0002nM-1D; Sun, 28 Feb 2021 20:35:41 +0300 To: imeevma@tarantool.org, sergos@tarantool.org, tsafin@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: Message-ID: <33f5e67c-5aeb-08d0-08b7-0ce23a0f2791@tarantool.org> Date: Sun, 28 Feb 2021 18:35:39 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9795828B892398B72AC588525E45B8D9948334200C4E13096182A05F53808504091489140BE5E7E9A060454484278F6B6F521C9951ED1A606FE788E91E4B663DF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F9D05773942AAE9CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637FD60A286D0BA57028638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCE4AC53B8EBFE911DC2903618780767AB444C4A8559D7D9AE389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0D9442B0B5983000E8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6E5E764EB5D94DBD4CC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FC9F5955FECEF5819E75ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E73528A6D463EDFD0DBBC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F347543BADC64E7283B503F486389A921A5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A50D1271F460664E62F6FDBF5C65B193CC300FB0CA04C1231CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75968C9853642EB7C3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349FF8F8245A2FAA7B2BEDF658FF7C3AC47EEA7C18BE9C6457B4891D5CAC29BFD09263D97D4B6EDE471D7E09C32AA3244CB59ABDE89911588B714B0AFE1487EF6E725D5B54B2FE4575927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojlGyyJLC51G8FHwwRRqI7qg== X-Mailru-Sender: 689FA8AB762F73936BC43F508A06382251F95B6DBAC93426FA83FEF5D5C32CC63841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v3 0/2] Encapsulate MEM type changing and checking X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thanks for the patchset! On 20.02.2021 17:59, Mergen Imeev via Tarantool-patches wrote: > This patch-set is part of issue #5818. It changes the way to check and change > MEM from outside. However, there is almost no changes in functions that work > with internal structure of MEM, most of which located in vdbemem.c. This will be > done in another patch-set. > > https://github.com/tarantool/tarantool/issues/5818 > https://github.com/tarantool/tarantool/tree/imeevma/gh-5818-encapsulate-mem-type-checking-and-changing > > Changes in v3: > - Inlined most of the introduced functions to improve performance. > - Some other fixes in code to improve performance. How is this patch related to performance? Isn't it called 'encapsulate'? Not 'optimize'. Or did the non-inlined approach make the performance worse than it is on the master branch? I see that on the master branch things like mem_set_... are not inlined and all is fine. I have no issues with optimizing it a bit, as long as it does not involve doing extra actions and does not complicate the code even more. And is not motivated by introduction of a perf issue in a different place. My main concern to the patchset is why do we still have Mem in that scattered all over the other source files? Can it be extracted into a new file sql/mem.h and .c? With proper API, separated into public and private. > Changes in v2: > - Squashed almost all patches. > - Review fixes. > > Mergen Imeev (2): > sql: Initialize MEM in sqlVdbeAllocUnpackedRecord() > sql: Encapsulate MEM type changing and checking > > src/box/sql/func.c | 14 +- > src/box/sql/sqlInt.h | 1 - > src/box/sql/vdbe.c | 513 ++++++++++++++++++---------------------- > src/box/sql/vdbeInt.h | 465 +++++++++++++++++++++++++++++++++--- > src/box/sql/vdbeapi.c | 57 ++--- > src/box/sql/vdbeaux.c | 360 ++++++++++++++-------------- > src/box/sql/vdbemem.c | 146 +----------- > src/box/sql/vdbesort.c | 9 +- > src/box/sql/vdbetrace.c | 12 +- > 9 files changed, 874 insertions(+), 703 deletions(-) >