From: Mergen Imeev via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH v3 0/2] Encapsulate MEM type changing and checking Date: Tue, 23 Mar 2021 15:34:18 +0300 [thread overview] Message-ID: <20210323123418.GA142065@tarantool.org> (raw) In-Reply-To: <33f5e67c-5aeb-08d0-08b7-0ce23a0f2791@tarantool.org> Hi! Thank you for the review. My answer below. I already sent you a new version. On Sun, Feb 28, 2021 at 06:35:39PM +0100, Vladislav Shpilevoy wrote: > 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. > Done. I moved all MEM-related functions to sql/mem.c ans sqm/mem.h. Rewrote some functions and wrote some new functions. > > 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(-) > >
prev parent reply other threads:[~2021-03-23 12:34 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-20 16:59 Mergen Imeev via Tarantool-patches 2021-02-20 16:59 ` [Tarantool-patches] [PATCH v3 1/2] sql: Initialize MEM in sqlVdbeAllocUnpackedRecord() Mergen Imeev via Tarantool-patches 2021-02-20 16:59 ` [Tarantool-patches] [PATCH v3 2/2] sql: Encapsulate MEM type changing and checking Mergen Imeev via Tarantool-patches 2021-02-28 17:35 ` Vladislav Shpilevoy via Tarantool-patches 2021-03-23 13:07 ` Mergen Imeev via Tarantool-patches 2021-02-28 17:35 ` [Tarantool-patches] [PATCH v3 0/2] " Vladislav Shpilevoy via Tarantool-patches 2021-03-23 12:34 ` Mergen Imeev via Tarantool-patches [this message]
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=20210323123418.GA142065@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imeevma@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v3 0/2] Encapsulate MEM type changing and checking' \ /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