From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 7 Mar 2019 13:59:22 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH v5 2/4] memtx: introduce tuple compare hint Message-ID: <20190307105922.vgarofpm5wnoahs3@esperanza> References: <53e165cf566611452821c692d79d621628e839ff.1551951540.git.kshcherbatov@tarantool.org> <20190307104221.GH5263@chai> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190307104221.GH5263@chai> To: Konstantin Osipov Cc: tarantool-patches@freelists.org, Kirill Shcherbatov List-ID: On Thu, Mar 07, 2019 at 01:42:21PM +0300, Konstantin Osipov wrote: > * Kirill Shcherbatov [19/03/07 12:46]: > > Implement functions for retrieving tuple hints for a particular > > key_def. Hint is an integer that can be used for tuple comparison > > optimization: if a hint of one tuple is less than a hint of another > > then the first tuple is definitely less than the second; only if > > hints are equal tuple_compare must be called for getting comparison > > result. > > I have a nit on the name: I think the previous name was better. > cmp_hint would be more clear too than cmp_aux_t. But it's not a hint per se. I mean, for a hinted tree, it is a hint, but for a multikey it's more than that - without it we can't compare two tuples. That said, I prefer aux over hint. If you have a better option, please share.